# API Returning HTML Instead of JSON At Specific Routes?

**URL:** <https://meta.discourse.org/t/api-returning-html-instead-of-json-at-specific-routes/100691>\
**Category:** Development\
**Created:** [October 28, 2018, 5:25pm UTC](https://meta.discourse.org/t/api-returning-html-instead-of-json-at-specific-routes/100691 "2018-10-28T17:25:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Wintermute](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wintermute/32/127023_2.png) [@Wintermute](https://meta.discourse.org/u/Wintermute)\
**Post date:** [November 21, 2018, 10:08pm UTC](https://meta.discourse.org/t/api-returning-html-instead-of-json-at-specific-routes/100691/4 "2018-11-21T22:08:27Z")

</div>

Continuing to face challenges with this issue in new situations

 ![UnexpectedToken](https://global.discourse-cdn.com/meta/original/3X/b/b/bb331a7da0af440f5ac41ceb1d0208c22638708d.png)

It seems in some instances the request is processed just fine and in some it fails and returns HTML.

Here I am sending individual requests for a large sequence of posts using the endpoint suggested at

> **[Discourse API Docs](https://docs.discourse.org/#tag/Posts%2Fpaths%2F~1posts~1%7Bid%7D%2Fget)**

Suggestions? I still believe there is something wonky going on on the backend that some of these routes would be failing.

---

_[View the full topic](https://meta.discourse.org/t/api-returning-html-instead-of-json-at-specific-routes/100691)._
