Need clarity on what Content API returns


In the company I work for, we’re looking at making use of Ghost for the company blog, and we want to do so via the API.
I’ve gone through the documentation and I see that the API returns JSON, but the JavaScript Content API Client Library has this part that confuses me,{slug: 'something'}, {formats: ['html', 'plaintext']});

Is that for cases where you want a format different from the “default” format which I presume is JSON?


By default the content api includes a html field - which is the html of the post. You can also request the plaintext which will add a plaintext field

source: Ghost Content API Documentation

I think you’re getting confused between the API response format and the content format.

Ghost’s API always returns JSON, but you can choose what format you want your content in.

By far and away the easiest way to understand this is to just try the API.

The content API docs have a working example here:

If you run this curl command, or easier copy and paste the URL into your browser you can instantly see what the API returns for our demo site:

Here is the default response:

And here’s the same request but with both the html and plaintext formats returned:,plaintext