Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

User

Returns your credit balance and account limits.

GET /v1/user

Request

No parameters.

curl https://scrape.iproyal.com/v1/user \
  -H "Authorization: Bearer $WEB_SCRAPER_API_TOKEN"
<?php

$ch = curl_init('https://scrape.iproyal.com/v1/user');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('WEB_SCRAPER_API_TOKEN'),
    ],
]);

$user = json_decode(curl_exec($ch), true);

echo $user['credit_amount'] . ' ' . $user['concurrency_limit'] . PHP_EOL;
import os

import requests

response = requests.get(
    "https://scrape.iproyal.com/v1/user",
    headers={"Authorization": f"Bearer {os.environ['WEB_SCRAPER_API_TOKEN']}"},
    timeout=30,
)
response.raise_for_status()

user = response.json()
print(user["credit_amount"], user["concurrency_limit"])

Response

{
  "credit_amount": 48250,
  "status": "active",
  "concurrency_limit": 50
}
Field
Type
Description

credit_amount

integer

Credits available on your balance

status

string

Account status. A successful response always shows active.

concurrency_limit

integer

Scrape requests that can run at the same time

Errors

HTTP Status

error.code

401

invalid_token

403

account_suspended or account_disabled

API explains each code.

Last updated

Was this helpful?