Get Balance
curl --request GET \
--url https://api.lobstr.io/v1/user/balance \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/user/balance"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/user/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/user/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/user/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/user/balance")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/user/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"name": "<string>",
"available": 123,
"consumed": 123,
"bonus_credit": 123,
"rollover_credit": 123,
"rollover_credit_expires_at": {},
"community_reward_credit": 123,
"community_reward_credit_expires_at": {},
"interval": "<string>",
"used_slots": 123,
"total_available_slots": 123,
"has_unpaid_bill": {},
"reset_time": "<string>"
}User
Get Balance
Check your account balance and available credits before launching operations
GET
/
v1
/
user
/
balance
Get Balance
curl --request GET \
--url https://api.lobstr.io/v1/user/balance \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/user/balance"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/user/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/user/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/user/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/user/balance")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/user/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"name": "<string>",
"available": 123,
"consumed": 123,
"bonus_credit": 123,
"rollover_credit": 123,
"rollover_credit_expires_at": {},
"community_reward_credit": 123,
"community_reward_credit_expires_at": {},
"interval": "<string>",
"used_slots": 123,
"total_available_slots": 123,
"has_unpaid_bill": {},
"reset_time": "<string>"
}This endpoint returns your current account balance and credit information. Use it to check available credits before launching expensive scraping operations or to monitor your spending.
It’s recommended to check your balance before starting large-scale data collection tasks to ensure you have sufficient credits.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
default:"application/json"
Content type of the request. Value:
application/jsonResponse Field Explanations
string
The plan’s price identifier. Example:
"price_abc123"string
Always
"plan".string
Name of the active subscription plan. Example:
"Professional"integer
Total credits on the plan (including bonus). For daily-interval plans, this is the daily allowance. Example:
10000integer
Credits consumed in the current billing period. Example:
1550integer
Bonus credits applied to the account. Example:
0integer
Unused credits rolled over from a previous period. Example:
200string | null
Timestamp when rollover credits expire, or
null if none. Example: nullinteger
Bonus credits earned through Community Story Rewards. Example:
500string | null
Timestamp when community reward credits expire, or
null if none. Example: nullstring
Credit reset interval (
"monthly" or "daily"). Example: "monthly"integer
Number of concurrency slots currently in use. Example:
3integer
Total concurrency slots available on the plan. Example:
20object
Outstanding unpaid invoice info. Empty object (
{}) when there is no unpaid bill — despite the name, this is not a boolean.string
Timestamp when credits will next reset. Example:
"2025-02-01T00:00:00Z"Check your balance before launching expensive operations to avoid running out of credits mid-task. Large scraping jobs can consume significant credits.
Balance information is updated in real-time. Each successful API response reflects your current credit balance.
If your balance reaches zero, ongoing operations will be paused until you add more credits. Plan ahead to avoid service interruptions.
Code Examples
curl -X GET "https://api.lobstr.io/v1/user/balance" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json"
import requests
headers = {
"Authorization": "Token YOUR_API_KEY",
"Content-Type": "application/json",
}
response = requests.get(
"https://api.lobstr.io/v1/user/balance",
headers=headers
)
balance_data = response.json()
print(f"Plan: {balance_data['name']}")
print(f"Total credits: {balance_data['available']}")
print(f"Consumed: {balance_data['consumed']}")
print(f"Remaining: {balance_data['available'] - balance_data['consumed']}")
print(f"Slots used: {balance_data['used_slots']} / {balance_data['total_available_slots']}")
Response
200
{
"id": "price_abc123",
"object": "plan",
"name": "Professional",
"available": 10000,
"consumed": 1550,
"bonus_credit": 0,
"rollover_credit": 200,
"rollover_credit_expires_at": null,
"community_reward_credit": 500,
"community_reward_credit_expires_at": null,
"interval": "monthly",
"used_slots": 3,
"total_available_slots": 20,
"has_unpaid_bill": {},
"reset_time": "2025-02-01T00:00:00Z"
}