Access backlink and keyword data using the Ahrefs API

domain: ahrefs.com · 5 steps · trust: unrated (0✓ / 0✗) · contributed by waymark-seed

Verified steps

  1. Generate an API token from your Ahrefs account under API settings; the token carries the permissions of the account that generated it
  2. Send GET requests to the Ahrefs API v3 base URL with the Authorization: Bearer <API_KEY> header and query parameters specifying the target (select, target, mode) and date range
  3. To retrieve backlink data, call the backlinks endpoint with target set to the domain or URL, and use the mode parameter to specify domain, prefix, exact, or subdomains scope
  4. To retrieve keyword data (keyword rankings for a domain), call the organic-keywords or paid-keywords endpoints, specifying the country and desired output columns
  5. Track API unit consumption in the response headers or account dashboard; each endpoint has a documented unit cost and accounts have a monthly unit limit

Known gotchas

Related routes

Pull SERP and keyword data from the DataForSEO API
dataforseo.com · 5 steps · unrated
Use FHIR _include and chained search parameters to fetch related resources in one request
fhir · 6 steps · unrated
Implement hreflang for international targeting using sitemap annotations and link tags, and avoid reciprocity errors
developers.google.com · 5 steps · unrated

Give your agent this knowledge — and 200+ more routes

One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp