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

Stats

You can check the number of requests you can perform within your daily limit by using the command stats.

This request doesn't require API limits.

Example PHP Python
Request data:
http://api.serpstat.com/v3/stats?token={token}
Response data:
{  
   "result":{  
      "max_lines":10000,
      "used_lines":502,
      "left_lines":9498
   },
   "status_msg":"OK",
   "status_code":200,
   "left_lines":9498
}
<?php
// This example works with Serpstat SDK only.
// Link: https://github.com/SerpstatGlobal/serpstat-sdk

require_once __DIR__ . '/../vendor/autoload.php';
// configure your application
$config = [
    'token' => 'd9632fc1ae1724da4d5ea2f3a99d5f5f',
];
// 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\CheckLimitsMethod();
try {
    // try call api method
    $response = $apiClient->call($apiMethod)->getResult();
} catch (\Exception $e) {
    // catch api error
    $response = $e->getMessage();
}
var_dump($response);
import codecs
import json
import pprint
import urllib.request as urlrequest
from urllib.parse import urlencode

host = 'http://api.serpstat.com/v3'

method = 'stats'
params = {
    'token': 'ijmiom4f5m34905g03um8342dm04923lre3w',  # string personal token
}

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

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

data = json.loads(json_data)
pprint.pprint(data)

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.

Name

Email

Phone

We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

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

Open support chat