Article API
Retrieve your published articles by urlTitle using your API key.
Endpoint
GET https://www.agent-engineering.dev/api/v1/articles/:urlTitleUse the article slug as urlTitle.
Access is restricted: the API key must belong to the same user who created the article.
Authentication
Provide your API key in either of these headers:
x-api-key: <YOUR_API_KEY>Authorization: Bearer <YOUR_API_KEY>API keys can be created and rotated on the Developer page.
Manage API keysQuery Parameters
?format=markdown | block- Default: markdown
- format=markdown returns content as a markdown string converted from BlockNote blocks
- format=block returns content as the raw BlockNote blocks JSON
Successful Response (200)
The API returns a consistent envelope:
{
"success": true,
"message": "OK",
"data": {
"article": {
"id": "…",
"title": "…",
"imageUrl": "…",
"topic": ["…"],
"clapCount": 0,
"seoTitle": "…",
"seoDescription": "…",
"wordCount": 0,
"minutesToRead": 0,
"snippet": "…",
"urlTitle": "…",
"content": "… or blocks JSON …",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}
}content is a string when format=markdown, otherwise it is JSON when format=block.
Error Responses
- 400 invalid format (must be block or markdown)
- 401 missing, invalid, or expired API key
- 403 API key owner is not the article creator
- 404 article not found
Examples
cURL (markdown default)
curl -s \
-H "x-api-key: <YOUR_API_KEY>" \
"https://www.agent-engineering.dev/api/v1/articles/testing"cURL (blocks)
curl -s \
-H "x-api-key: <YOUR_API_KEY>" \
"https://www.agent-engineering.dev/api/v1/articles/testing?format=block"fetch (TypeScript)
const res = await fetch("https://www.agent-engineering.dev/api/v1/articles/testing?format=markdown", {
headers: {
"x-api-key": process.env.AGENT_ENGINEERING_API_KEY!,
},
});
if (!res.ok) throw new Error(await res.text());
const body = await res.json();