Internal Linking API Docs

Run a crawl and read its internal link findings over REST.

How the API works

Four steps from an API key to the internal link findings of a crawl.

01

Create a key

Create a key in your dashboard, where it is shown once. API access is included with the Agency plan at $49 a month. A crawl started over the API counts against the plan's crawls, pages and worker time exactly like one started in the dashboard. The trial grants Pro, which does not include the API.

02

Send the key

Send your key on every request, in either header. A missing, unknown or revoked key is 401. A key belongs to one account, and every request is answered for that account only: a crawl id that belongs to somebody else answers exactly like one that does not exist.

03

Start a crawl

Start one crawl of one site with POST /api/v1/sites/{id}/crawls. The answer is 202 with the crawl id, which is what the other endpoints take. Nothing is created and nothing is charged before a refusal. 60 requests per key are allowed in a fixed 60 second window; over that is 429 with a Retry-After header, and a 429 is never charged. Every answer carries x-ratelimit-limit and x-ratelimit-remaining for the current window. One unit per successful call, only a 2xx answer is charged, and the Agency plan includes 50,000 units a month, shared with checks run in the web app and counted per calendar month in UTC. Charging is keyed by x-request-id, or by an id we generate when the header is absent, so a retry that sends the same id is answered again and charged once. Past that cap every call is 429 and nothing is charged.

04

Read the findings

Poll GET /api/v1/crawls/{id} for status and progress, then read the orphan lists and the link suggestions, and export the three CSV files. Every response body is JSON except the CSV files, which are sent as attachments. A bad request is 400 for a query value the endpoint cannot use, 401 for a missing, unknown or revoked key, 402 when the site is past what the plan covers, 403 when the plan does not include the API or the account is suspended, 404 when no crawl or export kind with that id belongs to this account, 409 when the site is not verified yet or a crawl is already running on it, 429 when the rate limit or the monthly unit cap is reached, and 503 when the crawl queue did not accept the job.

The API endpoint groups

All requests go to https://internallinkingtool.com. Each group below is answered by the route under src/app/api/v1/, for the account the key belongs to.

Authentication

Send your key on every request, in either header:

Authorization: Bearer sk_your_key
x-api-key: sk_your_key

A missing, unknown or revoked key is 401. A key belongs to one account, and every request is answered for that account only: a crawl id that belongs to somebody else answers exactly like one that does not exist.

GET /api/v1/sites

The account's sites, by host, with the id you start a crawl on.

curl https://internallinkingtool.com/api/v1/sites \
  -H "Authorization: Bearer sk_your_key"
{
  "sites": [
    {
      "id": "clz7x2m4p0001abcd1234efgh",
      "host": "https://example.com",
      "verified": true,
      "verifiedAt": "2026-10-04T09:12:44.000Z",
      "createdAt": "2026-10-03T16:40:02.000Z"
    }
  ]
}

host is the origin, with no trailing slash. verified is true once control of the host has been proved, which is required before that site can be crawled.

Host
Verified
Crawl id

POST /api/v1/sites/{id}/crawls

Start one crawl of one site. The answer is 202 with the crawl id, which is what the other endpoints take.

curl -X POST https://internallinkingtool.com/api/v1/sites/clz7x2m4p0001abcd1234efgh/crawls \
  -H "Authorization: Bearer sk_your_key" \
  -H "x-request-id: 2026-10-11-homepage"
{
  "crawlId": "clz9h8m4c0002ijkl5678mnop",
  "status": "PENDING",
  "maxPages": 20000
}

maxPages is the page cap the crawl was created with. A site that is not verified is 409, a crawl already running on that site is 409, a full plan is 402, a spent monthly crawl allowance is 429, and a queue that refused the job is 503. Nothing is created and nothing is charged before one of those refusals.

GET /api/v1/crawls/{id}

One crawl: its status and progress counters. Poll this after starting a crawl.

curl https://internallinkingtool.com/api/v1/crawls/clz9h8m4c0002ijkl5678mnop \
  -H "Authorization: Bearer sk_your_key"
{
  "id": "clz9h8m4c0002ijkl5678mnop",
  "status": "COMPLETED",
  "maxPages": 20000,
  "pagesCrawled": 128,
  "pagesFailed": 3,
  "pauseCount": 1,
  "resumeAt": null,
  "stopReason": null,
  "startedAt": "2026-10-11T09:30:02.000Z",
  "finishedAt": "2026-10-11T09:36:51.000Z",
  "createdAt": "2026-10-11T09:30:01.000Z",
  "siteId": "clz7x2m4p0001abcd1234efgh",
  "site": { "host": "https://example.com" },
  "sitemapUrlCount": 131
}

status is one of PENDING, RUNNING, PAUSED, ANALYZING, COMPLETED, FAILED or CANCELED. A paused crawl carries the time it resumes in resumeAt. A crawl id that is not yours is 404.

Poll after the crawl starts?
Yes, until it completes.

Orphans and suggestions

The two orphan lists of a crawl, computed by the same rule the results page and the CSV file use. A sitemap page other than the home page with no inlinks at all is in orphans; one with no inlinks from page content is in contextualOrphans. A page with no inlinks is in both lists, because it has no content inlinks either.

curl https://internallinkingtool.com/api/v1/crawls/clz9h8m4c0002ijkl5678mnop/orphans \
  -H "Authorization: Bearer sk_your_key"
{
  "crawlId": "clz9h8m4c0002ijkl5678mnop",
  "counts": { "orphans": 1, "contextualOrphans": 5 },
  "orphans": [
    {
      "url": "https://example.com/guides/water-temperature",
      "inlinks": 0,
      "contextualInlinks": 0,
      "depth": null
    }
  ],
  "contextualOrphans": [
    {
      "url": "https://example.com/guides/",
      "inlinks": 4,
      "contextualInlinks": 0,
      "depth": 1
    }
  ]
}

The internal links worth adding, highest score first. Each row names the page to link from, the page to link to, the anchor that already exists in the source page, the sentence it sits in, the score (a cosine of the two pages, so 0 to 1) and the terms that matched. limit is optional and capped, so total tells you what you are paging through.

curl "https://internallinkingtool.com/api/v1/crawls/clz9h8m4c0002ijkl5678mnop/suggestions?limit=100" \
  -H "Authorization: Bearer sk_your_key"
{
  "crawlId": "clz9h8m4c0002ijkl5678mnop",
  "total": 214,
  "limit": 100,
  "suggestions": [
    {
      "from": "https://example.com/guides/french-press-guide",
      "to": "https://example.com/guides/grind-size-chart",
      "anchor": "grind size",
      "sentence": "The grind size chart below covers every brewer on this site.",
      "score": 0.62,
      "matchedTerms": ["grind size"]
    }
  ]
}

Without limit you get the first 100 rows. A value that is not a whole number between 1 and 500 is 400.

Orphans
Depth
Suggestions
Score

GET /api/v1/crawls/{id}/export/{orphans|suggestions|links}

The three CSV files of a crawl, built by the same code the dashboard export buttons use, so a file and the JSON answers cannot disagree. The response is an attachment named after the kind.

curl https://internallinkingtool.com/api/v1/crawls/clz9h8m4c0002ijkl5678mnop/export/orphans \
  -H "Authorization: Bearer sk_your_key" \
  -o orphans.csv

The columns of each file: orphans.csv has url, kind, inlinks, contextual_inlinks, depth, in_sitemap. suggestions.csv has from_url, to_url, anchor, sentence, score, matched_terms. links.csv has from_url, to_url, anchor, contextual, nofollow. A kind the product does not export is 404, like a crawl that is not there. Errors are JSON with two fields: error, a label a client can branch on, and message, the sentence a person can read.

{
  "error": "Unauthorized.",
  "message": "Send a valid API key as Authorization: Bearer <key> or in the x-api-key header."
}
orphans.csvsuggestions.csv
links.csv404