Skip to content

Credits in practice

RelayX is prepaid: you hold credits on an API key and each call spends some. The current rates are on the pricing table; this page explains how a charge is worked out.

  1. Per item returned. List endpoints charge per tweet, user or follower actually returned; deeper, fuller pages cost less per item. Single lookups (for example user/info) are a fixed price per call.
  2. A per-call minimum applies to every call, including one that returns nothing — the page was still fetched. It’s waived automatically on bulk responses, where the per-item total is already higher.
  3. Failures are free. Any response with an HTTP status of 400 or above is not charged.
  4. Checking your balance is free: GET /account/credits.

Every charged response carries two headers:

  • X-Credits-Cost — what this call cost.
  • X-Credits-Remaining — your balance afterwards.
import requests
r = requests.get("https://api.relayxapi.com/twitter/user/followers",
params={"userName": "NASA"}, headers={"X-API-Key": "YOUR_KEY"})
print(r.headers["X-Credits-Cost"], r.headers["X-Credits-Remaining"])

Requests per second depend on the credits you keep on the key:

Credit balance Requests / second
Free / trial 1
≥ 1,000 3
≥ 5,000 6
≥ 10,000 10
≥ 50,000 20
Status Meaning What to do
401 Missing, wrong or revoked key Check the X-API-Key header
402 Not enough credits for this call Top up in the dashboard
429 Over your requests-per-second limit Wait for the Retry-After seconds, then retry

None of these are charged.