“API: top_pages”
Identifies the specific URLs and pages on a domain that capture the most estimated organic traffic in a location.
- Cost: 1 API credit per successful call.
- Module: Competitors (Competitor analysis)
- REST endpoint:
POST https://api.ranki.co/v1/top-pages
What it’s for
top_pages answers the strategic question: “Which content or pages on this website perform best?”.
When you analyze a competitor, it helps you quickly identify their winning content architecture, which categories or products attract the most visits and how many keywords each individual URL ranks for.
API parameters
- Operation:
top_pages - Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
domain | string | Yes | – | Target domain (e.g. "allbirds.com"). |
location | string | Yes | – | Country or geographic location (e.g. "United States"). |
page | integer | No | 1 | Page number (50 URLs per page). |
url_filter | string | No | – | URL fragments (UI filter; before pagination). |
url_filter_type | string | No | "contains" | contains/like or not_contains/not_like. |
traffic_min / traffic_max | string | No | – | Estimated organic traffic (ETV) range. |
Endpoint
POST https://api.ranki.co/v1/top-pages
Authorization: Bearer rk_TU_CLAVE_AQUI
Content-Type: application/json
{
"domain": "allbirds.com",
"location": "United States",
"page": 1
}
Example with curl
curl -s -X POST
-H "Authorization: Bearer rk_TU_CLAVE_AQUI"
-H "Content-Type: application/json"
-d '{
"domain": "allbirds.com",
"location": "United States",
"page": 1
}'
"https://api.ranki.co/v1/top-pages"
Sample response
{
"credits_consumed": 1,
"credits_remaining": 244,
"data": {
"domain": "allbirds.com",
"location": "United States",
"total_pages": 3200,
"items": [
{
"url": "https://www.allbirds.com/",
"estimated_traffic": 45000,
"traffic_share": 8.5,
"keywords_count": 620,
"top_keyword": "allbirds"
},
{
"url": "https://www.allbirds.com/collections/womens-sneakers",
"estimated_traffic": 28000,
"traffic_share": 5.2,
"keywords_count": 410,
"top_keyword": "womens sneakers"
}
]
}
}
Response fields
| Field | Type | Description |
|---|---|---|
credits_consumed | integer | Credits deducted (1 credit). |
credits_remaining | integer | Remaining API credit balance. |
data.items | array | List of pages sorted by organic traffic, descending. |
items[].url | string | Canonical URL of the page. |
items[].estimated_traffic | integer | Estimated monthly organic traffic this URL receives. |
items[].traffic_share | number | Share of the domain’s total traffic that this page represents. |
items[].keywords_count | integer | Number of distinct keywords this URL ranks for. |
items[].top_keyword | string | Main keyword that brings the most traffic to the page. |