Usage statistics

You can find your usage statistics by sending a request to the following endpoint:

curl -u username:password https://scraper-api.smartproxy.com/v1/stats
<?php
$username = "username";
$password = "password";

$target = curl_init('http://scraper-api.smartproxy.com/v1/stats');
curl_setopt($target, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($target, CURLOPT_USERPWD, sprintf('%s:%s', $username, $password));
curl_setopt($target, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);

$result = curl_exec($target);
curl_close($target);
if ($result)
echo $result;
?>
import requests

username = 'username'
password = 'password'
user_pass = (username, password)

response = requests.get('http://scraper-api.smartproxy.com/v1/stats', auth=user_pass)

print(response.text)

Parameters:

ParameterDescriptionRequiredValid values
targetLets you get usage statistics of a single target of your choice.Any valid target value. Cannot be used for Web product.
date_fromThe lower date boundary. Best used together with date_toAny date in Y-m-d format.
date_toThe upper date boundary. Best used together with date_fromAny date in Y-m-d format.
group_byEnables showing daily, monthly or yearly usage stats (instead of showing total stats)day, month, year

Sample request

curl -u username:password https://scraper-api.smartproxy.com/v1/stats?date_from=2024-01-01&date_to=2024-02-01&group_by=day&target=google_search

Legacy endpoint

🚧

This endpoint is for backwards-compatibility only. If you are starting from scratch, you should use the endpoint above. All parameters work on both endpoints.

curl -u username:password scrape.smartproxy.com/v1/user/stats
<?php
$username = "username";
$password = "password";

$target = curl_init('http://scrape.smartproxy.com/v1/user/stats');
curl_setopt($target, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($target, CURLOPT_USERPWD, sprintf('%s:%s', $username, $password));
curl_setopt($target, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);

$result = curl_exec($target);
curl_close($target);
if ($result)
echo $result;
?>
import requests

username = 'username'
password = 'password'
user_pass = (username, password)

response = requests.get('http://scrape.smartproxy.com/v1/user/stats', auth=user_pass)

print(response.text)