Ahrefs API v2 will stop working on March 1st, 2024
This documentation is for the legacy version of our API (v2), which has been discontinued. All active API v2 subscriptions will stop working on March 1st, 2024. Existing Integration apps will continue to work as before until further notice, but new submissions are no longer accepted.
To switch from API v2 to v3, please contact our Enterprise team. Read about API v3.
Documentation - pages_extended
Contains additional metrics about the target, such as total number of referring domains, referring class C networks and referring IP addresses.
Each request to pages_extended costs 1 row.
Each result in the response costs 1 row.
Using 'where' costs 5 rows.
Using 'having' costs 5 rows.
• pages
Column | Type | Where | Having | Description |
---|---|---|---|---|
url | string | + | + | URL of the crawled page. |
ahrefs_rank | int | + | + | URL Rating of the page. |
first_seen | date | + | + | Least recent date when the Ahrefs crawler was able to crawl the page. |
last_visited | date | + | + | Most recent date when the Ahrefs crawler was able to crawl the page. |
http_code | int | + | + | HTTP code that was last returned for the page. |
size | int | + | + | Size of the crawled page, in bytes. |
links_internal | int | + | + | Number of internal links found in the crawled page. |
links_external | int | + | + | Number of external links found in the crawled page. |
encoding | string | + | + | Character encoding of the page, for example "utf8" or "iso-8859-1" (Latin-1). |
title | string | + | + | Title of the crawled page. |
redirect_url | string | + | + | URL where the page redirects to. |
content_encoding | string | + | + | Type of encoding used to compress the page data, for example "gzip" or "deflate". |
backlinks | int | + | + | Number of external backlinks found on the referring pages that link to the crawled page. |
dofollow | int | + | + | Number of DoFollow backlinks that link to the crawled page. |
nofollow | int | + | + | Number of NoFollow backlinks that link to the crawled page. |
redirects | int | + | + | Number of pages found that redirect to the crawled page. |
refdomains | int | + | + | Number of domains containing at least one backlink that links to the crawled page. |
refclass_c | int | + | + | Number of referring class C networks that link to the crawled page. |
refips | int | + | + | Number of distinct IP addresses under a single network that link to the crawled page. |
Examples
Request
https://apiv2.ahrefs.com?from=pages_extended&target=ahrefs.com&mode=domain&limit=2&output=json
Response
{ "pages":[ { "url":"https://ahrefs.com/", "ahrefs_rank":85, "first_seen":"2013-11-20T09:46:29Z", "last_visited":"2013-11-20T09:46:29Z", "http_code":200, "size":9211, "links_internal":26, "links_external":4, "encoding":"utf8", "title":"Ahrefs Site Explorer & Backlink Checker", "redirect_url":"", "content_encoding":"gzip", "backlinks":15901, "dofollow":6186, "nofollow":9144, "redirects":571, "refdomains":1134, "refclass_c":836, "refips":964 }, { "url":"http://ahrefs.com/", "ahrefs_rank":0, "first_seen":"2013-11-20T09:46:29Z", "last_visited":"1970-01-01T00:00:00Z", "http_code":0, "size":0, "links_internal":0, "links_external":0, "encoding":"", "title":"", "redirect_url":"", "content_encoding":"", "backlinks":0, "dofollow":0, "nofollow":0, "redirects":0, "refdomains":2334, "refclass_c":1342, "refips":1537 } ], "stats":{ "pages":393209 } }