Ahrefs API v2 has been deprecated
This documentation is for the legacy version of our API (v2), which was fully discontinued on November 1, 2025. All remaining API v2 integrations and apps built on it no longer have access to Ahrefs data.
To build new integrations, please use Ahrefs API v3 and the Ahrefs Connect program.
Documentation - pages
Contains the crawled pages. The result is similar to the crawled pages report found in the raw data export in Site Explorer.
Each request to pages costs 1 row.
Each result in the response costs 0.2 rows.
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 | + | + | The date Ahrefs' bot first found a backlink to your target website or URL on a given referring 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". |
Examples
Request
Response
{
"pages":[
{
"url":"https://ahrefs.com/",
"ahrefs_rank":85,
"first_seen":"2013-01-02T09: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"
},
{
"url":"http://ahrefs.com/",
"ahrefs_rank":81,
"first_seen":"2013-01-03T16:50:51Z",
"last_visited":"2013-11-23T16:50:51Z",
"http_code":301,
"size":20,
"links_internal":1,
"links_external":0,
"encoding":"raw",
"title":"",
"redirect_url":"https://ahrefs.com/",
"content_encoding":"gzip"
}
],
"stats":{
"pages":26699
}
}