Ghost API

Development / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

The Ghost Content API provides read-only access to posts, pages, tags, authors, and settings published on a Ghost CMS instance — letting you pull your blog content into any frontend, app, or static site generator. A separate Admin API is available for write operations like creating or updating content. Each Ghost site exposes its own API endpoint with a site-specific Content API key.

💡

Beginner Tip

To use the Ghost API you need your own Ghost site (self-hosted or Ghost Pro) — there is no shared public endpoint. Find your Content API key under Ghost Admin > Integrations > Add Custom Integration. The base URL is always https://your-site.com/ghost/api/content/.

Available Data

Ghost data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Ghost",
    "description": "Get Published content into your Website, App or other embedded media",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

posts Array of published post objects matching your query and filter parameters.
posts[].slug URL-safe unique identifier for the post, used to construct the public URL.
posts[].title The published title of the post.
posts[].html Full rendered HTML content of the post body, ready to embed in your frontend.
posts[].published_at ISO 8601 timestamp of when the post was made public.
posts[].feature_image URL of the post featured image, or null if none is set.

Implementation Example

const url = "https://ghost.org/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The key query parameter is missing or the Content API key is wrong
Append ?key=<your-content-api-key> to every request — find this in Ghost Admin > Integrations.
Empty posts array No posts have been published yet, or the requested filter does not match any content
Make sure content is published (not draft) in Ghost Admin, and verify any filter parameters use Ghost NQL syntax.
CORS error from browser The Ghost site CORS settings do not allow requests from your frontend origin
Add your frontend URL to the allowed origins in Ghost Admin settings, or use a server-side proxy to fetch content.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Development
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →