Auto Billing Reset
curl --request GET \
--url https://api.lobstr.io/v1/plans/auto-reset \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"enabled": true,
"threshold_pct": 123,
"max_resets_per_24h": 123
}
'import requests
url = "https://api.lobstr.io/v1/plans/auto-reset"
payload = {
"enabled": True,
"threshold_pct": 123,
"max_resets_per_24h": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({enabled: true, threshold_pct: 123, max_resets_per_24h: 123})
};
fetch('https://api.lobstr.io/v1/plans/auto-reset', 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/plans/auto-reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'threshold_pct' => 123,
'max_resets_per_24h' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/plans/auto-reset"
payload := strings.NewReader("{\n \"enabled\": true,\n \"threshold_pct\": 123,\n \"max_resets_per_24h\": 123\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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/plans/auto-reset")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"enabled\": true,\n \"threshold_pct\": 123,\n \"max_resets_per_24h\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/plans/auto-reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"enabled\": true,\n \"threshold_pct\": 123,\n \"max_resets_per_24h\": 123\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"threshold_pct": 123,
"max_resets_per_24h": 123,
"resets_used_in_window": 123,
"window_resets_at": {},
"current_usage_pct": {}
}User
Auto Billing Reset
Configure automatic billing cycle resets when credit usage crosses a threshold
GET
/
v1
/
plans
/
auto-reset
Auto Billing Reset
curl --request GET \
--url https://api.lobstr.io/v1/plans/auto-reset \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"enabled": true,
"threshold_pct": 123,
"max_resets_per_24h": 123
}
'import requests
url = "https://api.lobstr.io/v1/plans/auto-reset"
payload = {
"enabled": True,
"threshold_pct": 123,
"max_resets_per_24h": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({enabled: true, threshold_pct: 123, max_resets_per_24h: 123})
};
fetch('https://api.lobstr.io/v1/plans/auto-reset', 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/plans/auto-reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'threshold_pct' => 123,
'max_resets_per_24h' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/plans/auto-reset"
payload := strings.NewReader("{\n \"enabled\": true,\n \"threshold_pct\": 123,\n \"max_resets_per_24h\": 123\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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/plans/auto-reset")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"enabled\": true,\n \"threshold_pct\": 123,\n \"max_resets_per_24h\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/plans/auto-reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"enabled\": true,\n \"threshold_pct\": 123,\n \"max_resets_per_24h\": 123\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"threshold_pct": 123,
"max_resets_per_24h": 123,
"resets_used_in_window": 123,
"window_resets_at": {},
"current_usage_pct": {}
}Automatically reset your billing cycle when credit usage crosses a configurable threshold — so your scrapers never stall waiting for a manual reset. A rolling 24-hour cap protects against runaway spending.
Returns your current Auto Billing Reset configuration and live usage status.
How it works
When Auto Billing Reset is enabled, a background poller checks your credit usage periodically. Once your usage exceedsthreshold_pct, it triggers a billing cycle reset: your plan renews immediately (charging your card on file) and your credits are restored to zero consumed. The max_resets_per_24h cap limits how many times this can happen in any rolling 24-hour window.
If the payment fails (including 3D Secure cards, which cannot complete authentication unattended), the reset is suppressed for the rest of the current billing cycle and you receive a failure email.
Get settings
string
required
Your API authentication token. Value:
Token YOUR_API_KEYResponse fields
boolean
Whether Auto Billing Reset is currently active.
integer
Credit usage percentage that triggers a reset. Example:
80 (reset when 80% of credits are consumed).integer
Maximum number of automatic resets allowed in any rolling 24-hour window (1–10).
integer
Number of resets that have already fired in the current 24-hour window.
string | null
UTC timestamp when the current 24-hour window expires and the counter resets, or
null if no window is active.number | null
Your current credit usage as a percentage of your plan’s allowance, or
null if no active subscription.Update settings
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
required
Must be application/json. Value:
application/jsonboolean
required
Enable or disable Auto Billing Reset.
integer
Credit usage percentage that triggers a reset. Must be between 1 and 100. Defaults to your current setting.
integer
Maximum automatic resets in any rolling 24-hour window. Must be between 1 and 10. Defaults to your current setting.
If you POST with
enabled: true and your usage is already above threshold_pct, an immediate reset is triggered.Auto Billing Reset charges your card on file each time it fires. Ensure
max_resets_per_24h is set to a value you’re comfortable with before enabling.Code Examples
curl -X GET "https://api.lobstr.io/v1/plans/auto-reset" \
-H "Authorization: Token YOUR_API_KEY"
curl -X POST "https://api.lobstr.io/v1/plans/auto-reset" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"threshold_pct": 80,
"max_resets_per_24h": 2
}'
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}", "Content-Type": "application/json"}
# Get current settings
res = requests.get(f"{BASE_URL}/plans/auto-reset", headers=headers)
print(res.json())
# Enable with threshold at 80%, max 2 resets per day
res = requests.post(f"{BASE_URL}/plans/auto-reset",
headers=headers,
json={"enabled": True, "threshold_pct": 80, "max_resets_per_24h": 2}
)
print(res.json())
GET Response
200
{
"enabled": true,
"threshold_pct": 80,
"max_resets_per_24h": 2,
"resets_used_in_window": 1,
"window_resets_at": "2026-08-02T14:30:00Z",
"current_usage_pct": 73.4
}
POST Response
200
{
"enabled": true,
"threshold_pct": 80,
"max_resets_per_24h": 2,
"resets_used_in_window": 0,
"window_resets_at": null,
"current_usage_pct": 73.4
}