Get access to 30+ marketing and SEO tools. analyze competitors, keywords, and backlinks for free..
Sign in Sign Up

We use cookies to make Serpstat better. By clicking "Accept cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Learn more

Domain Top Pages (get_top_urls)

get_top_urls — method returns all website's pages in hierarchical order. Also, it shows the number of keywords from Google top-100 or Yandex top-50 for each URL, visitors a page would receive per month if it was to rank number 1 in Google or Yandex SERP for its top-20 keywords, Facebook and LinkedIn shares of the researched domain's page. The results are sorted by traffic volume.


Following parameters can be used for pagination:

  • page_size: number of results per page (default: 100, max: 1000)
  • page: page number (set to the 1st page by default)


Following parameters can be used for sorting:

  • sort: field that needs to be sorted (organic_keyword, facebook_shares, linkedin_shares, google_shares, potencial_traff). For example sort=organic_keywords&page_size=100
  • order: sort results in descending order "desc" or ascending order "asc" ( default: desc ). For example order=desc
Metrics Description
result Encapsulates the answer
total The total number of the website pages
top_urls Encapsulates the answer

URL of the domain

organic_keywords The number of keywords the URL ranks for in Google top-100 or Yandex top-50 results
facebook_shares The number of Facebook shares of the researched domain's page.
potencial_traff The number of visitors a page would receive per month if it was to rank number 1 in Google or Yandex SERP for its top-20 keywords
status_msg Response "Ok" or "Error" report on a successful or unsuccessful request
status_code Response code "200" — successful request. 
Errors occur when limits are exceeded (number of simultaneous requests or account limits)
left_lines API limits left

Example PHP Python
Request data:
Response data:


require_once __DIR__ . '/vendor/autoload.php';
// configure your application
$config = [
    'token' => '5ef58df8d6a5ef19efa6b9d460f41806',
//domain name
$domain = '';
//optional params
$additionalParams =[
    'page' => 1,
//pagination result page
    'order' => 'asc',
//order (asc, desc)
    'sort' => 'organic_keywords',];
/*sort by value of (can be sorted by - organic_keywords
*- facebook_shares
*- potencial_traff
// init client with your serpstat api token
$apiClient = new \Serpstat\Sdk\Core\ApiGuzzleHttpClient($config['token']);
// create instance of api method class
$apiMethod = new \Serpstat\Sdk\Methods\GetTopUrlsMethod(
try {
    // try call api method
    $response = $apiClient->call($apiMethod)->getResult();
} catch (\Exception $e) {
    // catch api error
    $response = $e->getMessage();

import json
import pprint
import urllib.request as urlrequest
from urllib.parse import urlencode

host = ''
method = 'get_top_urls'
wait_timeout = 600  # sec

params = {
    'query': '',
    'se': 'g_us',
    'order': 'asc',
    'sort': 'organic_keywords',
    'token': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'}

api_url = "{host}/{method}?{params}".format(
    params=urlencode(params, safe=',')

json_data = None
    json_data = urlrequest.urlopen(api_url, timeout=wait_timeout).read()
except Exception as e0:
    print("API request error: {error}".format(error=e0))

if json_data:
    data = json.loads(json_data)

Share this article with your friends

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?


To complete your registration you need to enter your phone number


We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

Personal demonstration

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.




We are glad of your comment
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Спасибо, мы с вами свяжемся в ближайшее время

View Editing


You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits