API reference
Articles
A read-only mirror of the posts on your WordPress site. The plugin syncs every post, not only the ones Autoranko wrote, and Autoranko keeps a new version each time a post's content changes. These endpoints return the latest version of each post.
2 endpointsBase URL https://autoranko.com/api/public/v1Every request needs a bearer token
List synced articles
https://autoranko.com/api/public/v1/sites/{id}/articlesLists the posts the Autoranko plugin has synced from this WordPress site: your whole content library, not only the articles Autoranko wrote. Each post appears once, at its latest synced version, without the body. Fetch GET /sites/{id}/articles/{postId} for the full HTML.
Results are ordered by WordPress post ID, ascending. Page through them with limit and offset until a page returns fewer than limit items; there's no total count. A newly connected site returns an empty list until the plugin's first sync.
Request
idintegerRequiredSite ID, from GET /sites.
limitintegerOptionalPage size. Values outside 1–200 are clamped to that range, not rejected.- Default
50- Range
1–200- Example
50
offsetintegerOptionalHow many posts to skip, for pagination. Negative values count as 0.- Default
0- Minimum
0- Example
0
qstringOptionalCase-insensitive search in titles (substring match). The search covers every stored version, so a post whose title changed can match an old title; that older version is then returned.- Example
aeration
curl "https://autoranko.com/api/public/v1/sites/1/articles?limit=200&offset=0" \
-H "Authorization: Bearer $AUTORANKO_TOKEN"const headers = { Authorization: `Bearer ${process.env.AUTORANKO_TOKEN}` };
const limit = 200;
for (let offset = 0; ; offset += limit) {
const url = `https://autoranko.com/api/public/v1/sites/1/articles?limit=${limit}&offset=${offset}`;
const res = await fetch(url, { headers });
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
for (const article of data.articles) {
console.log(article.wp_post_id, `v${article.version}`, article.title);
}
if (data.articles.length < limit) break;
}import os
import requests
headers = {"Authorization": f"Bearer {os.environ['AUTORANKO_TOKEN']}"}
limit, offset = 200, 0
while True:
res = requests.get(
"https://autoranko.com/api/public/v1/sites/1/articles",
headers=headers, params={"limit": limit, "offset": offset}, timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
for article in data["articles"]:
print(article["wp_post_id"], f"v{article['version']}", article["title"])
if len(data["articles"]) < limit:
break
offset += limit<?php
$limit = 200;
for ($offset = 0; ; $offset += $limit) {
$ch = curl_init("https://autoranko.com/api/public/v1/sites/1/articles?limit=$limit&offset=$offset");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AUTORANKO_TOKEN')],
]);
$data = json_decode(curl_exec($ch), true);
if (isset($data['error'])) throw new RuntimeException($data['error']['message']);
foreach ($data['articles'] as $article) {
echo $article['wp_post_id'], " v{$article['version']} ", $article['title'], "\n";
}
if (count($data['articles']) < $limit) break;
}Response
200OKOne page of synced posts: the latest version of each, without the body.
application/jsonarticlesarray of objectsPosts on this page, ordered by WordPress post ID.articlesitems(7)ArticleSummarywp_post_idstringWordPress post ID: a 64-bit integer serialized as a string. Use it as{postId}.titlestringPost title as of this version (up to 500 characters).statusstringWordPress post status as reported by the plugin, such aspublishordraft.urlstringThe post's permalink (empty if the plugin didn't send one).post_modifiedstring (date-time) or nullWhen the post was last modified in WordPress, ornullif unknown.synced_atstring (date-time)When Autoranko stored this version.versionintegerSnapshot number: 1 for the first sync, then +1 each time the plugin syncs changed content. Title or status changes alone don't create a new version.
limitintegerThe page size that was applied (after clamping).offsetintegerThe offset that was applied.
Examples
GET/sites/1/articles?limit=2Illustrative
{
"articles": [
{
"wp_post_id": "118",
"title": "Lawn Aeration: When and How to Do It",
"status": "publish",
"url": "https://demo.autoranko.com/lawn-aeration-guide/",
"post_modified": "2026-10-20T14:32:10.000Z",
"synced_at": "2026-10-20T14:35:02.418Z",
"version": 3
},
{
"wp_post_id": "124",
"title": "5 Signs Your Sprinkler Heads Need Replacing",
"status": "draft",
"url": "https://demo.autoranko.com/?p=124",
"post_modified": "2026-10-24T09:12:44.000Z",
"synced_at": "2026-10-24T09:15:01.927Z",
"version": 1
}
],
"limit": 2,
"offset": 0
}The demo site has no synced posts yet, so these two are illustrative.
GET/sites/1/articles?limit=2
{
"articles": [],
"limit": 2,
"offset": 0
}Errors
| Error | When |
|---|---|
| 401missing_token | The Authorization: Bearer … header is missing. |
| 401invalid_token | The token is malformed, unknown or revoked. |
| 404not_found | No site with this id belongs to your account (Site not found.). |
| 429rate_limited | The token made more than 120 requests in the last 60 seconds. |
Get an article
https://autoranko.com/api/public/v1/sites/{id}/articles/{postId}Returns the latest synced version of one WordPress post, including its full HTML content. postId is the WordPress post ID: wp_post_id in the article list, the same number WordPress shows in the post editor's URL.
version starts at 1 and goes up each time the plugin syncs a change to the post's content. Changes to the title or status alone don't create a new version, so title and status are as of the last content change.
Request
idintegerRequiredSite ID, from GET /sites.postIdintegerRequiredWordPress post ID:wp_post_idfrom GET /sites/{id}/articles.
curl https://autoranko.com/api/public/v1/sites/1/articles/118 \
-H "Authorization: Bearer $AUTORANKO_TOKEN"const res = await fetch("https://autoranko.com/api/public/v1/sites/1/articles/118", {
headers: { Authorization: `Bearer ${process.env.AUTORANKO_TOKEN}` },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
const { article } = data;
console.log(`${article.title} (v${article.version}, ${article.status})`);
console.log(article.content.slice(0, 300));import os
import requests
res = requests.get(
"https://autoranko.com/api/public/v1/sites/1/articles/118",
headers={"Authorization": f"Bearer {os.environ['AUTORANKO_TOKEN']}"},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
article = data["article"]
print(f"{article['title']} (v{article['version']}, {article['status']})")
print(article["content"][:300])<?php
$ch = curl_init('https://autoranko.com/api/public/v1/sites/1/articles/118');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AUTORANKO_TOKEN')],
]);
$data = json_decode(curl_exec($ch), true);
if (isset($data['error'])) throw new RuntimeException($data['error']['message']);
$article = $data['article'];
printf("%s (v%d, %s)\n", $article['title'], $article['version'], $article['status']);
echo substr($article['content'], 0, 300), "\n";Response
200OKThe latest synced version of the post, with full HTML.
application/jsonarticleobjectThe post.articlekeys(8)Articlewp_post_idstringWordPress post ID: a 64-bit integer serialized as a string. Use it as{postId}.versionintegerSnapshot number: 1 for the first sync, then +1 each time the plugin syncs changed content. Title or status changes alone don't create a new version.titlestringPost title as of this version (up to 500 characters).contentstringThe post's full HTML, as synced by the plugin.statusstringWordPress post status as reported by the plugin, such aspublishordraft.urlstringThe post's permalink (empty if the plugin didn't send one).post_modifiedstring (date-time) or nullWhen the post was last modified in WordPress, ornullif unknown.synced_atstring (date-time)When Autoranko stored this version.
Examples
GET/sites/1/articles/118Illustrative
{
"article": {
"wp_post_id": "118",
"version": 3,
"title": "Lawn Aeration: When and How to Do It",
"content": "<h2>What lawn aeration does</h2>\n<p>Aeration pulls small plugs of soil out of the lawn so air, water and fertilizer reach the roots. It relieves the compaction left by foot traffic and mowing.</p>\n<h2>When to aerate</h2>\n<p>Aerate cool-season grasses in early fall and warm-season grasses in late spring, while the grass is growing fast enough to fill the holes.</p>",
"status": "publish",
"url": "https://demo.autoranko.com/lawn-aeration-guide/",
"post_modified": "2026-10-20T14:32:10.000Z",
"synced_at": "2026-10-20T14:35:02.418Z"
}
}The demo site has no synced posts yet, so this post is illustrative.
GET/sites/1/articles/9999
{
"error": {
"code": "not_found",
"message": "Article not found."
}
}Errors
| Error | When |
|---|---|
| 401missing_token | The Authorization: Bearer … header is missing. |
| 401invalid_token | The token is malformed, unknown or revoked. |
| 404not_found | No site with this id belongs to your account (Site not found.). |
| 404not_found | The site has no synced post with this postId (Article not found.). |
| 429rate_limited | The token made more than 120 requests in the last 60 seconds. |
API version v1. Every path on this page is relative to https://autoranko.com/api/public/v1.