Endpoints for internal link suggestions and broken link checking.
GET /rankforge/v1/links/suggest/{post_id}
Get internal link suggestions for a post. The route needs the Rank Forge Pro add-on with its AI features enabled (without it the call answers pro_required with HTTP 403), and the caller must be able to edit the post. No screen of Rank Forge calls it.
curl -u "admin:ABCD 1234 EFGH 5678 IJKL 9012" \
https://example.com/wp-json/rankforge/v1/links/suggest/42[
{
"id": 15,
"title": "WordPress Performance Optimization",
"url": "https://example.com/wordpress-performance/",
"type": "post",
"relevance": 35
},
{
"id": 28,
"title": "Best SEO Plugins for WordPress",
"url": "https://example.com/best-seo-plugins/",
"type": "post",
"relevance": 22
}
]This is the answer of the keyword method. When AI is configured on the site, the route first asks the AI service, which uses AI credits, and returns its answer instead when the answer is usable; the service is asked to describe each link with post_id, anchor_text and context. If the AI client reports that no account is connected, that the connection is no longer valid or that credits are used up, the route answers with that error. See Internal Links for the details.
POST /rankforge/v1/links/auto-insert/{post_id}
Inserts internal links into the post with Rank Forge’s own matching. It does not call the AI service, so it takes no AI credits. It looks at the ten best related posts and wraps a phrase of this post that matches a related post’s title, or one of its title words, in a link, one link per related post and at most the number set as Max links per post (default 3, 1 to 10). It adds no links back from the related posts. Like the route above, it needs the Pro add-on with its AI features enabled (HTTP 403 pro_required without it), and the caller must be able to edit the post.
curl -X POST -u "admin:ABCD 1234 EFGH 5678 IJKL 9012" \
https://example.com/wp-json/rankforge/v1/links/auto-insert/42{
"success": true,
"message": "2 internal links inserted.",
"links_added": 2,
"new_score": 82
}links_added is the number of links placed, and new_score is the SEO score after a new analysis of the post. When no related post is found, success is false and the message says so (HTTP 200). When related posts are found but no phrase of the post fits, success is true, links_added is 0 and the content is unchanged.
GET /rankforge/v1/links/broken/{post_id}
Check the links in the body of one post. The route needs the Rank Forge Pro add-on: without it the call answers feature_not_available with HTTP 404. The caller must be able to edit the post (HTTP 403 otherwise). The check is local: it sends a HEAD request to each link and uses no AI credits. The Broken Links screen of the free plugin runs its own batch scan and does not call this route.
curl -u "admin:ABCD 1234 EFGH 5678 IJKL 9012" \
https://example.com/wp-json/rankforge/v1/links/broken/42[
{
"url": "https://example.com/deleted-page/",
"status": 404,
"broken": true,
"error": null
},
{
"url": "https://example.com/about/",
"status": 200,
"broken": false,
"error": null
}
]The response lists every checked link, not only the broken ones. broken is true when the status is 0 or 400 and above. A status of 0 means no answer (a timeout or a domain that could not be resolved), and error then holds the message of the HTTP client. Links that start with #, mailto: or tel: and addresses on private networks are left out, and relative addresses come back as full URLs.
—