How to Get All Posts in JSON Format with Ghost Public API
In this small and easy tutorial we are going to get all posts from a Ghost blog using Ghost Public API. We need to cover a few steps:
Enable Ghost Public API
Enable Ghost Public API from your Ghost Admin Dashboard (Dashboard -> Settings -> Labs)
Get client_id and client_secret
Get client_id and client_secret. Go to your website and View page source. You should see something like this:
Replace clientId and clientSecret with data that you found in the source. Also replace example.com with your domain. The request must come from a URL that the Ghost blog recognises or the request will not be authorised.