Ahrefs Web Analytics API

Web_analytics.

GitHub OpenAPI
Business capability
Digital Marketing Management BC-400.60

Operations 34

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /web-analytics/stats Get overall web analytics stats · Stats #
Ask an LLM
“How many pageviews and visitors did my site get?”
“Can I get overall web analytics stats for a date range?”
Tell an agent
Get web analytics stats for project {project_id}.
Show total pageviews and visitors for project {project_id} from {from} to {to}.
GET /web-analytics/chart Chart web analytics over time · Chart #
Ask an LLM
“Can I chart my web analytics by day or week?”
“What does my web analytics trend look like over a period?”
Tell an agent
Chart web analytics for project {project_id} at {granularity} from {from} to {to}.
Plot web analytics for project {project_id} by {granularity}.
GET /web-analytics/browsers List web analytics by browser · Browsers #
Ask an LLM
“Which browsers drive the most traffic to my site?”
“Can I see web analytics broken down by browser?”
Tell an agent
List web analytics by browser for project {project_id}.
Show browser traffic for project {project_id} from {from} to {to}.
GET /web-analytics/browsers-chart Chart web analytics by browser · Browsers Chart #
Ask an LLM
“Can I chart web analytics for specific browsers over time?”
“What does browser traffic look like for a few browsers?”
Tell an agent
Chart web analytics for browsers {browser_to_chart} in project {project_id} at {granularity}.
Plot browser traffic for project {project_id} by {granularity}.
GET /web-analytics/browser-versions List web analytics browser versions · Browser Versions #
Ask an LLM
“Which browsers drive the most visitors to my site?”
“Can I filter browser version stats by traffic source?”
Tell an agent
List browser versions for project {project_id}.
Show top {limit} browsers by visitors in project {project_id}.
GET /web-analytics/browser-versions-chart Chart web analytics browser versions · Browser Versions Chart #
Ask an LLM
“Can I chart browser usage over time for a project?”
“What does the browser version trend look like?”
Tell an agent
Chart browser versions in project {project_id} at {granularity} granularity.
Plot browser versions matching {where} in project {project_id} from {from} to {to}.
GET /web-analytics/cities List web analytics by city · Cities #
Ask an LLM
“Which cities send the most traffic to my site?”
“Can I see web analytics broken down by city?”
Tell an agent
List web analytics by city for project {project_id}.
Show city traffic for project {project_id} from {from} to {to}.
GET /web-analytics/cities-chart Chart web analytics by city · Cities Chart #
Ask an LLM
“Can I chart web analytics for specific cities over time?”
“What does city traffic look like for a few cities?”
Tell an agent
Chart web analytics for cities {cities_to_chart} in project {project_id} at {granularity}.
Plot city traffic for project {project_id} by {granularity}.
GET /web-analytics/continents List web analytics by continent · Continents #
Ask an LLM
“Which continents send the most traffic to my site?”
“Can I see web analytics broken down by continent?”
Tell an agent
List web analytics by continent for project {project_id}.
Show continent traffic for project {project_id} from {from} to {to}.
GET /web-analytics/continents-chart Chart web analytics by continent · Continents Chart #
Ask an LLM
“Can I chart web analytics for specific continents over time?”
“What does continent traffic look like for a few continents?”
Tell an agent
Chart web analytics for continents {continents_to_chart} in project {project_id} at {granularity}.
Plot continent traffic for project {project_id} by {granularity}.
GET /web-analytics/countries List web analytics by country · Countries #
Ask an LLM
“Which countries send the most traffic to my site?”
“Can I see web analytics broken down by country?”
Tell an agent
List web analytics by country for project {project_id}.
Show country traffic for project {project_id} from {from} to {to}.
GET /web-analytics/countries-chart Chart web analytics by country · Countries Chart #
Ask an LLM
“Can I chart web analytics for specific countries over time?”
“What does country traffic look like for a few countries?”
Tell an agent
Chart web analytics for countries {countries_to_chart} in project {project_id} at {granularity}.
Plot country traffic for project {project_id} by {granularity}.
GET /web-analytics/devices List web analytics by device · Devices #
Ask an LLM
“Which devices drive the most traffic to my site?”
“Can I see web analytics broken down by device?”
Tell an agent
List web analytics by device for project {project_id}.
Show device traffic for project {project_id} from {from} to {to}.
GET /web-analytics/devices-chart Chart web analytics by device · Devices Chart #
Ask an LLM
“Can I chart web analytics for specific devices over time?”
“What does device traffic look like for a few devices?”
Tell an agent
Chart web analytics for devices {devices_to_chart} in project {project_id} at {granularity}.
Plot device traffic for project {project_id} by {granularity}.
GET /web-analytics/entry-pages List web analytics by entry page · Entry Pages #
Ask an LLM
“Which pages do visitors land on first?”
“Can I see web analytics broken down by entry page?”
Tell an agent
List web analytics by entry page for project {project_id}.
Show entry page traffic for project {project_id} from {from} to {to}.
GET /web-analytics/entry-pages-chart Chart web analytics by entry page · Entry Pages Chart #
Ask an LLM
“Can I chart web analytics for specific entry pages over time?”
“What does entry page traffic look like for a few pages?”
Tell an agent
Chart web analytics for entry pages {entry_pages_to_chart} in project {project_id} at {granularity}.
Plot entry page traffic for project {project_id} by {granularity}.
GET /web-analytics/exit-pages List web analytics by exit page · Exit Pages #
Ask an LLM
“Which pages do visitors leave from?”
“Can I see web analytics broken down by exit page?”
Tell an agent
List web analytics by exit page for project {project_id}.
Show exit page traffic for project {project_id} from {from} to {to}.
GET /web-analytics/exit-pages-chart Chart web analytics by exit page · Exit Pages Chart #
Ask an LLM
“Can I chart web analytics for specific exit pages over time?”
“What does exit page traffic look like for a few pages?”
Tell an agent
Chart web analytics for exit pages {exit_pages_to_chart} in project {project_id} at {granularity}.
Plot exit page traffic for project {project_id} by {granularity}.
GET /web-analytics/languages List web analytics by language · Languages #
Ask an LLM
“Which languages do my visitors speak?”
“Can I see web analytics broken down by language?”
Tell an agent
List web analytics by language for project {project_id}.
Show language traffic for project {project_id} from {from} to {to}.
GET /web-analytics/languages-chart Chart web analytics by language · Languages Chart #
Ask an LLM
“Can I chart web analytics for specific languages over time?”
“What does language traffic look like for a few languages?”
Tell an agent
Chart web analytics for language {browser_language_to_chart} in project {project_id} at {granularity}.
Plot language traffic for project {project_id} by {granularity}.
GET /web-analytics/operating-systems List the operating systems used to visit a site · Operating Systems #
Ask an LLM
“Which operating systems are my visitors using?”
“Can I see the top operating systems for a date range?”
Tell an agent
List operating systems for project {project_id}.
Show the top {limit} operating systems for project {project_id} from {from} to {to}.
GET /web-analytics/operating-systems-chart Chart operating systems over time · Operating Systems Chart #
Ask an LLM
“Can I chart operating system usage over time?”
“What does the operating system split look like by day or week?”
Tell an agent
Chart operating systems for project {project_id} by {granularity}.
Plot {os_to_chart} on the operating system chart for project {project_id} from {from} to {to}, by {granularity}.
GET /web-analytics/operating-systems-versions List operating system versions used to visit a site · Operating Systems Versions #
Ask an LLM
“Which versions of each operating system are my visitors on?”
“Can I rank operating system versions by pageviews?”
Tell an agent
List operating system versions for project {project_id}.
Show the top {limit} operating system versions for project {project_id} from {from} to {to}.
GET /web-analytics/operating-systems-versions-chart Chart operating system versions over time · Operating Systems Versions Chart #
Ask an LLM
“Can I chart operating system versions over time?”
“Which OS versions trend up or down in usage?”
Tell an agent
Chart operating system versions for project {project_id} by {granularity}.
Plot {os_versions_to_chart} on the OS version chart for project {project_id} from {from} to {to}, by {granularity}.
GET /web-analytics/source-channels List traffic source channels · Source Channels #
Ask an LLM
“Where is my site traffic coming from?”
“Can I break down traffic by source channel?”
Tell an agent
List source channels for project {project_id}.
Show the top {limit} source channels for project {project_id} from {from} to {to}.
GET /web-analytics/source-channels-chart Chart traffic source channels over time · Source Channels Chart #
Ask an LLM
“Can I chart where my traffic comes from over time?”
“What does the source channel split look like by day?”
Tell an agent
Chart source channels for project {project_id} by {granularity}.
Plot {source_channels_to_chart} on the source channel chart for project {project_id} from {from} to {to}, by {granularity}.
GET /web-analytics/sources List referring sources · Sources #
Ask an LLM
“Which websites are sending me traffic?”
“Can I see the top referring sources?”
Tell an agent
List referring sources for project {project_id}.
Show the top {limit} referring sources for project {project_id} from {from} to {to}.
GET /web-analytics/sources-chart Chart referring sources over time · Sources Chart #
Ask an LLM
“Can I chart referring sources over time?”
“Which referring sources trend up or down?”
Tell an agent
Chart referring sources for project {project_id} by {granularity}.
Plot {sources_to_chart} on the referring source chart for project {project_id} from {from} to {to}, by {granularity}.
GET /web-analytics/referrers List referring domains · Referrers #
Ask an LLM
“Which domains are sending me traffic?”
“Can I see the top referring domains?”
Tell an agent
List referring domains for project {project_id}.
Show the top {limit} referring domains for project {project_id} from {from} to {to}.
GET /web-analytics/referrers-chart Chart referring domains over time · Referrers Chart #
Ask an LLM
“Can I chart referring domains over time?”
“What does the referring domain split look like by week?”
Tell an agent
Chart referring domains for project {project_id} by {granularity}.
Plot {source_referers_to_chart} on the referring domain chart for project {project_id} from {from} to {to}, by {granularity}.
GET /web-analytics/top-pages List the most visited pages · Top Pages #
Ask an LLM
“Which pages on my site get the most visits?”
“Can I see the top pages by pageviews?”
Tell an agent
List the top pages for project {project_id}.
Show the top {limit} pages for project {project_id} from {from} to {to}.
GET /web-analytics/top-pages-chart Chart top pages over time · Top Pages Chart #
Ask an LLM
“Can I chart my top pages over time?”
“Which pages trend up or down in visits?”
Tell an agent
Chart the top pages for project {project_id} by {granularity}.
Plot {pages_to_chart} on the top pages chart for project {project_id} from {from} to {to}, by {granularity}.
GET /web-analytics/utm-params List values of a UTM parameter · UTM Parameters #
Ask an LLM
“What values are people using for a given UTM parameter?”
“Can I break down traffic by UTM source or medium?”
Tell an agent
List values of UTM parameter {utm_param} for project {project_id}.
Show the top {limit} values of {utm_param} for project {project_id} from {from} to {to}.
GET /web-analytics/utm-params-chart Chart UTM parameter values over time · UTM Parameters Chart #
Ask an LLM
“Can I chart UTM parameter values over time?”
“What does a UTM parameter's usage look like by day?”
Tell an agent
Chart values of UTM parameter {utm_param} for project {project_id} by {granularity}.
Plot {utm_params_to_chart} on the {utm_param} chart for project {project_id} from {from} to {to}, by {granularity}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ahrefs:ahrefs-web-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ahrefs-web-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ahrefs Web Analytics API
  description: Ahrefs API v3 gives programmatic access to Ahrefs' SEO, marketing, and AI-search data — backlinks, organic and paid traffic, keywords, SERPs, rank tracking, site audits, brand/AI-search visibility, web and social analytics, and account management. This is the full spec for every tool; each tool also has its own spec under /reference/.
  termsOfService: https://ahrefs.com/terms
  contact:
    name: Ahrefs
    url: https://ahrefs.com/
    email: support@ahrefs.com
  version: 3.0.0
servers:
- url: https://api.ahrefs.com/v3
  description: Ahrefs API v3
security:
- http:
  - read
tags:


# --- truncated at 32 KB (237 KB total) ---
# Full source: https://artifacts.apis.io/ahrefs/openapi/ahrefs-web-analytics-api-openapi.yml