XDataFly

Documentation

Everything you need to make your first call.

Quick start

New accounts get 15 free credits — enough to validate the whole flow. Create a key in the console, then swap out the sk_live_… placeholder below.

  1. 1Create an account and sign in to the console
  2. 2Create an API key under “API keys” (shown only once)
  3. 3Make your first call with the sample below
bash
curl --location 'https://api.xdatafly.com/v1/amazon/reviews?asin=B0DXK317FN&page_count=1&sort=recent&star=all_stars&site=amz_us' \
  --header 'Accept: application/json' \
  --max-time 120 \
  --header 'secret-key: sk_live_xxxxxxxxxxxxxxxx'

Authentication

Send your key in the secret-key header. Keys look like sk_live_… and are shown only once when created.

http
secret-key: sk_live_xxxxxxxxxxxxxxxx
Base URL
text
https://api.xdatafly.com

Endpoints

EndpointPrice
GET /v1/amazon/reviews
Amazon Reviews API
1/ per pageDetails →
GET /v1/google/search
Google Search APIComing soon
2/ per callComing soon
Amazon reviews request
bash
curl --location 'https://api.xdatafly.com/v1/amazon/reviews?asin=B0DXK317FN&page_count=1&sort=recent&star=all_stars&site=amz_us' \
  --header 'Accept: application/json' \
  --max-time 120 \
  --header 'secret-key: sk_live_xxxxxxxxxxxxxxxx'
Which queries are rejected

Advanced operators such as site:, inurl:, intitle: and filetype: return 40003. Those queries are significantly more expensive, so we keep them closed for now.

Response envelope

Every response — success or failure — uses the same envelope.

json
{
  "code": 0,
  "message": "ok",
  "request_id": "req_7f3a9c21",
  "data": {},
  "usage": {
    "credits": 1,
    "balance": 999
  },
  "duration_ms": 2140
}
  • code — business code, 0 means success
  • usage.credits — credits actually charged (0 on failure)
  • usage.balance — available balance after settlement

Billing rules

Only calls that return status SUCCESS are charged. The response envelope always reports the credits used and your remaining balance, so you can reconcile spend without guessing.

Freeze
Credits reserved up front from the parameter ceiling
Execute
Call upstream and parse the response
Settle
Charged only on success; released in full otherwise

Latency & timeouts

Amazon reviews are scraped from Amazon in real time; a single page typically takes 5–40 seconds and can be slower at peak. Set your client timeout to ≥60 seconds (curl --max-time, Python timeout). The common 30-second default will time out spuriously; note that timeouts and upstream failures release the reserved credits — they are not charged.

Error codes

CodeHTTPMeaningCharged
0200SuccessYes
40001400Missing or malformed parameterNo
40002400Parameter out of range (num 1-20, page_count 1-10)No
40003400Query contains a forbidden operator such as site: / inurl: / filetype:No
40100401Missing or invalid secret-keyNo
40101401API key disabled or expiredNo
40301403Endpoint not available yetNo
40201402Available credits cannot cover the reservationNo
42900429Per-minute request limit exceededNo
50001502Upstream unavailable; credits releasedNo
50002500Upstream response unparsable; credits releasedNo
50000500Internal server errorNo

Rate limits

Each key has a per-minute request limit (default 60). Responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Exceeding the limit returns HTTP 429 with a Retry-After header.

X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-ResetRetry-After

Idempotency

Send your own X-Request-Id header. Repeating the same id within 24 hours returns the cached response instead of charging again.

Ready to integrate?

15 free credits on signup, no card required.

Get an API key