30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Get Internal Links For A Post

seo/get-internal-links returns the internal links out of one post and the number pointing back at it, from Yoast’s own link index.

Incoming links are how Yoast judges whether a page is reachable and important.

At a glance

Abilityseo/get-internal-links
ToolsetYoast SEO — toolset/yoast-seo
GroupYoast SEO › Content Analysis
RequiresYoast SEO, active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

The two directions answer different questions. Outgoing links describe what the post connects to, which is about the reader’s journey. Incoming links describe how much of the site vouches for this page, which is about whether search engines will take it seriously.

A page with no incoming links is invisible to that model however good its content is, and that judgement is reflected in Yoast’s own reporting and in how search engines crawl the site.

Yoast keeps a table of indexables — one row per post, term, author, archive and system page — and that table is what archive titles, breadcrumbs and the internal-link reporting are read from. It is built by a background process, and an empty index is the usual reason those features return nothing.

The link index is built by the same process, so it shares the same failure: if indexation has never run, this returns nothing for every post and the absence looks like an answer.

Yoast counts links it recognises in the content. A link rendered by JavaScript, or one inside a shortcode Yoast cannot expand, is not in the index — so a page can be well linked in practice and orphaned according to the index.

Input

NameTypeRequiredWhat it is
post_idintegerYesThe post.

What comes back

NameTypeWhat it is
outgoingarrayInternal links out of the post.
incoming_countintegerHow many internal links point at it.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

How well linked is post 412?

It resolves to one call:

{
  "ability": "seo/get-internal-links",
  "parameters": {
    "post_id": 412
  }
}

Worth knowing

  • Incoming links are the direction that matters for ranking.
  • Needs the link index built. An unbuilt index returns zero for everything.
  • JavaScript-rendered links are not counted.
  • Read-only.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading