Anchor Text
Get the anchor text phrases used in links to a domain, ranked by how often they appear.
GET
/v1/anchor-text2 creditsAPI keyReturns the anchor text distribution for links pointing at a domain: which phrases other sites use, how many links use each, and from how many distinct domains. Useful for spotting over-optimized profiles and branded versus generic mixes. Data comes from the pre-processed link graph snapshot (see Response format).
Request
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
domain | string | Yes | none | Domain to query, for example stripe.com. No scheme or path. Must contain a dot. Subdomains of the domain are included. |
limit | integer | No | 100 | Number of phrases to return. Clamped to 1 to 1000. A non-numeric value falls back to 100. |
This endpoint does not support offset. Raise limit (up to 1000) to see more phrases.
Example
curl "https://api.rankparse.com/v1/anchor-text?domain=stripe.com&limit=20" \
-H "X-API-Key: rp_your_key"import requests
res = requests.get(
"https://api.rankparse.com/v1/anchor-text",
params={"domain": "stripe.com", "limit": 20},
headers={"X-API-Key": "rp_your_key"},
timeout=90,
)
res.raise_for_status()
body = res.json()
if body.get("partial"):
print("Partial result: exact-domain anchors only")
for row in body["data"]:
print(row["anchor_text"], row["link_count"], row["domain_count"])const params = new URLSearchParams({ domain: "stripe.com", limit: "20" });
const res = await fetch(`https://api.rankparse.com/v1/anchor-text?${params}`, {
headers: { "X-API-Key": "rp_your_key" },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const body = await res.json();
console.log(body.data, body.partial ?? false);Response
{
"domain": "stripe.com",
"data": [
{ "anchor_text": "Stripe", "link_count": 48210, "domain_count": 9120 },
{ "anchor_text": "stripe.com", "link_count": 15733, "domain_count": 4310 },
{ "anchor_text": "payment processing", "link_count": 2104, "domain_count": 811 }
],
"total": 3,
"limit": 20,
"credits_used": 2,
"credits_remaining": 996
}Response fields
Top level:
| Field | Type | Description |
|---|---|---|
domain | string | The normalized (lowercased) domain you queried. |
data | array | Anchor phrases sorted by link_count descending. Empty when the domain has no data. |
total | integer | Number of rows returned in data. |
limit | integer | The limit value you sent, echoed back as received. |
partial | boolean | Only present, and always true, when the result is incomplete (see below). |
credits_used | integer | Always 2. |
credits_remaining | integer | Your balance after this call. |
Each row in data:
| Field | Type | Description |
|---|---|---|
anchor_text | string | The anchor phrase. |
link_count | integer | Number of links using this phrase. |
domain_count | integer | Number of distinct domains using this phrase. |
Behavior and limits
- What is excluded: empty anchors, whitespace-only anchors and anchors that start with
<(raw markup) are left out. - Partial results: the endpoint first answers for the exact domain, then widens to include subdomains. If the wider query runs out of time, you get the exact-domain rows with
partial: true. Partial responses are billed normally but are not cached, so repeating the request later can return the full answer. - Credits: 2 per call, charged before the lookup. If the lookup fails with a server error, the credits are refunded.
- Caching: complete results are cached for 30 days per crawl release and per combination of
domainandlimit. A cache hit is billed the same as a fresh lookup. - Empty results: a domain with no data returns
200withdata: [], never404. - Rate limit: 60 requests per minute per key. See Rate limiting.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_domain | domain is missing or not a valid domain. |
| 401 | invalid_api_key | Missing, invalid or revoked API key. |
| 402 | insufficient_credits | Balance is lower than the call cost. |
| 402 | spend_cap_reached | Your monthly spend cap is reached. |
| 429 | rate_limited | More than 60 requests in a minute. |
| 503 | query_timeout, upstream_error | Transient data store problem. Retry after the Retry-After header. Credits are refunded. |
See Errors for the full list and the error body format.
Related
MCP tool: get_anchor_text (accepts domain, limit).