Ever wanted a latest posts list? Or a featured posts list? Or a list of your tags? The API makes all of this (and much more) possible...
Since day one, Ghost has been powered by its own JSON API, which provides access to all posts, tags, users and so on. Until very recently, the API was locked down and not accessible to the outside world. We're slowly adding a set of tools to Ghost labs to make it super easy to grab and display your posts and tags however you want.
As a blog owner, this gives you enormous amounts of power and flexibility for how and where you can display your blog posts.
Before: Sidebars like this had to be hard coded or laboriously extracted from RSS feeds.
Now: Themes can easily include lists of recent, featured, or related posts using the get helper, which provides quick access to the API for themes. Tags are also available, so you can even go 90s-style and add a tag cloud to your blog!
If you want to break out from your Ghost blog and display your latest posts on a different website, the API lets you do this with ease. Ghost now has a built-in script that can be included in your site to make fetching your posts via ajax quick and simple.
Before: The only way to display data from your Ghost blog was to fetch the latest posts from the RSS feed.
Now: The API lets you quickly fetch and display posts on a different site with ajax.
The possibilities for getting data from the API are practically endless. Posts, tags and users can all be fetched and filtered in various ways. We're also working on enabling write access, so it'll soon be possible to publish posts from 3rd party applications.
Stay up to date with the latest Ghost news, tutorials and resources. All the best bits, delivered every Sunday.