pages_info - Ahrefs API

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_info

Contains additional info about the target, such as IP address, canonical URL, social meta tags and social metrics.

Each request to pages_info costs 10 rows.
Each result in the response costs 10 rows.
Using 'where' costs 5 rows.
Using 'having' costs 5 rows.

pages

Column Type Where Having Description
url string + + URL of the crawled page.
ip string + + IP address of the server that returned the page.
time int + + The time it takes for the crawler to load the full content of the document, measured in milliseconds.
http_code int + + The HTTP status code returned by the URL.
size int + + Size of the crawled page, in bytes.
words int + + The word count of content displayed on the page
links_internal int + + Number of internal links found in the crawled page.
links_external int + + Number of external links found in the crawled page.
links_images int + + The number of incoming links to the image file.
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.
canonical_url string + + Canonical URL of the page.
content_encoding string + + Type of encoding used to compress the page data, for example "gzip" or "deflate".
description string + + Description of the crawled page.
meta_social string + + Contents of meta tags for social sharing sites.
h1 array + + The H1 subheaders on the page.
h2 array + + The H2 subheaders on the page.
images_alt array + + Image Alt text found on the page.
powered_by array + + Platform that this website are using.
render_result array + + Indicates that the crawler had executed JavaScript on the page to generate content.

Examples



Request

https://apiv2.ahrefs.com?from=pages_info&target=ahrefs.com&mode=domain&limit=2&output=json

Response

{"pages":[{"url":"https://ahrefs.com/","ip":"151.80.39.61","time":0.069732,"http_code":200,"size":28176,"words":1434,"links_internal":60,"links_external":17,"links_images":30,"encoding":"utf8","title":"Ahrefs - SEO Tools & Resources To Grow Your Search Traffic","redirect_url":"","canonical_url":"","content_encoding":"gzip","description":["Audit your website, explore competitors, research keywords & backlinks - all in one place. Powered by seriously big data & trusted by top SEOs."],"meta_social":["og:image:https://static.ahrefs.com/images/ahrefs-logo.png"],"h1":["Tools to grow your search traffic, research your competitors and monitor your niche","7 days. 7 dollars. Full access."],"h2":["The tools you get with Ahrefs","The best and most complete data in the industry powers Ahrefs' tools.","More Ahrefs perks","Recommended by leading experts in marketing and SEO","7 days. 7 dollars. Full access.","Learn SEO with Ahrefs","Sign In"],"images_alt":["huffpost","surveymonkey","expedia","tripadvisor","shopify","ebay","pinterest","uber","netflix","adobe","linkedin","facebook","Jon Cooper","Michael King","Rhea Drysdale","Aaron Wall","Gael Breton","Brian Dean","New features released regularly","Tailored learning materials","Private Facebook community","24/5 customer support","Ahrefs","Alerts","Rank Tracker","Content Explorer","Backlink data","Keywords Explorer","Competitive Analysis","Ahrefs site explorer"],"powered_by":[],"render_result":"rendered"},{"url":"http://ahrefs.com/","ip":"151.80.39.61","time":0.121737,"http_code":301,"size":0,"words":0,"links_internal":1,"links_external":0,"links_images":0,"encoding":"utf8","title":"","redirect_url":"https://ahrefs.com/","canonical_url":"","content_encoding":"","description":[],"meta_social":[],"h1":[],"h2":[],"images_alt":[],"powered_by":[],"render_result":"not_rendered"}],"stats":{"pages":114755}}