Request Response Errors & next steps 01 / Request
Make a request POST /api/v1/quotes
A quote expires after two minutes. Check amountCents against your budget and expiresAt before purchasing.
A quote does not reserve stock. Its country, product and operator are bound to the quote; changing any of them requires a new quote.
Required headers Authentication guide JSON body countrystring Required Country ID returned by List countries, for example england. Use the ID, not the display name. productstring Required Service ID returned by List services for your country, for example google. operatorstring Optional Operator ID from List operators. Defaults to any when omitted. cURL JavaScript Python
# Set SCRAPINGBUDDY_API_KEY in your server environment.
curl -X POST "https://www.scrapingbuddy.com/api/v1/quotes" \
-H "Authorization: Bearer $SCRAPINGBUDDY_API_KEY " \
-H "Content-Type: application/json" \
-d '{"country":"england","product":"google","operator":"any"}' // Node.js 20+. Keep credentials on your server.
const base = "https://www.scrapingbuddy.com/api/v1" ;
const response = await fetch (base + "/quotes" , {
method: "POST" ,
headers: {
Authorization: "Bearer " + process.env. SCRAPINGBUDDY_API_KEY ,
"Content-Type" : "application/json" ,
},
body: JSON . stringify ({ "country" : "england" , "product" : "google" , "operator" : "any" }),
signal: AbortSignal. timeout ( 30000 ),
});
const data = await response. json ();
if ( ! response.ok) throw new Error (response.status + ": " + data.error);
console. log (data); # Python 3. Install: pip install requests
import os
import requests
base = "https://www.scrapingbuddy.com/api/v1"
headers = { "Authorization" : "Bearer " + os.environ[ "SCRAPINGBUDDY_API_KEY" ]}
response = requests.post(
base + "/quotes" ,
headers = headers,
json = { "country" : "england" , "product" : "google" , "operator" : "any" },
timeout = 30 ,
)
response.raise_for_status()
data = response.json()
print (data) Base URL https://www.scrapingbuddy.com/api/v1
Set the environment variables shown in the example. Python requires requests; JavaScript requires Node.js 20+. These examples call the live API, not a sandbox.
02 / Response
Understand the response Success returns HTTP 201 with JSON. Read the fields below before using the result.
idUUID Quote ID to use as quoteId when purchasing. amountCentsinteger Customer price in USD cents. 25 means $0.25. expiresAtdate-time Quote expiry, two minutes after creation. Example response / illustrative values {
"id" : "11111111-1111-4111-8111-111111111111" ,
"country" : "england" ,
"product" : "google" ,
"operator" : "any" ,
"amountCents" : 25 ,
"currency" : "USD" ,
"expiresAt" : "2026-09-12T12:02:00.000Z"
} Prices, stock, phone numbers, messages and timestamps here are illustrative, not live availability or a price guarantee.
Errors & next steps Failures return an HTTP error status and a JSON error message. Correct validation and authentication errors before retrying. For 429, honor Retry-After; longer account limits may still apply.
All keys share the account limit of 60 API requests per minute. Purchase recovery must keep the original idempotency key and quote ID.