Ahrefs Geography API

The Geography API from Ahrefs — 8 operation(s) for geography.

GitHub OpenAPI

Operations 8

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 /cities List cities by visitors or pageviews · Cities #
Ask an LLM
“Which cities send the most visitors to my site?”
“Can I rank cities by pageviews for a date range?”
Tell an agent
List cities in project {project_id} from {from} to {to}.
Show the top {limit} cities by {order_by} for project {project_id}.
GET /cities-chart Chart visitors by city · Cities Chart #
Ask an LLM
“Can I chart visitors from each city over time?”
“Which cities are trending up or down in visitors?”
Tell an agent
Chart cities {cities_to_chart} for project {project_id} at {granularity} from {from} to {to}.
Plot city visitors for project {project_id} at {granularity}.
GET /continents List continents by visitors or pageviews · Continents #
Ask an LLM
“Which continents send the most visitors to my site?”
“Can I rank continents by pageviews for a date range?”
Tell an agent
List continents in project {project_id} from {from} to {to}.
Show the top {limit} continents by {order_by} for project {project_id}.
GET /continents-chart Chart visitors by continent · Continents Chart #
Ask an LLM
“Can I chart visitors from each continent over time?”
“Which continents are trending up or down in visitors?”
Tell an agent
Chart continents {continents_to_chart} for project {project_id} at {granularity} from {from} to {to}.
Plot continent visitors for project {project_id} at {granularity}.
GET /countries List countries by visitors or pageviews · Countries #
Ask an LLM
“Which countries send the most visitors to my site?”
“Can I rank countries by pageviews for a date range?”
Tell an agent
List countries in project {project_id} from {from} to {to}.
Show the top {limit} countries by {order_by} for project {project_id}.
GET /countries-chart Chart visitors by country · Countries Chart #
Ask an LLM
“Can I chart visitors from each country over time?”
“Which countries are trending up or down in visitors?”
Tell an agent
Chart countries {countries_to_chart} for project {project_id} at {granularity} from {from} to {to}.
Plot country visitors for project {project_id} at {granularity}.
GET /languages List languages by visitors or pageviews · Languages #
Ask an LLM
“Which languages do my visitors use most?”
“Can I rank languages by pageviews for a date range?”
Tell an agent
List languages in project {project_id} from {from} to {to}.
Show the top {limit} languages by {order_by} for project {project_id}.
GET /languages-chart Chart visitors by language · Languages Chart #
Ask an LLM
“Can I chart visitors by language over time?”
“Which languages are trending up or down in visitors?”
Tell an agent
Chart browser language {browser_language_to_chart} for project {project_id} at {granularity} from {from} to {to}.
Plot language visitors for project {project_id} at {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-geography-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-geography-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Web Analytics Geography API
  description: Web_analytics.
  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/web-analytics
  description: Ahrefs Web Analytics
security:
- http:
  - read
tags:


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