APITube Help Center

How to Debug Your API Requests

Find the cause of a failed or unexpected API response

Erick Horn

Written by Erick Horn

June 28, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to debug your API requests

Start with the HTTP status and the error’s code and message. Then check your key mode and quota in the response headers. If the cause is still unclear, try the same request in the dashboard’s API Playground and compare it with your API Logs.

Start with the HTTP status and error code

An API error has status: "not_ok", a request_id and an errors array. Read errors[0].code and errors[0].message. For a 400, the message usually names the parameter to fix.

Use cURL’s -i flag to print headers and the response body:

curl -i -H "X-API-Key: api_live_YOUR_KEY" \
  "https://api.apitube.io/v1/news/everything?language.code=en&per_page=5"

See API error codes and HTTP responses for the status meanings.

Read the response headers

These headers help explain the response:

  • X-Request-ID: the request reference to include when contacting support.
  • x-apitube-mode: test or live, showing which kind of key you sent.
  • x-points-remaining: remaining plan requests.
  • x-balance-remaining: remaining pay-as-you-go balance, in cents.
  • x-subscription-plan: the key’s plan.
  • x-budget-remaining: remaining allowance under a monthly pay-as-you-go limit, if set.

Reproduce the call in the API Playground

Open API Playground in the dashboard. Select the same key, endpoint and parameters, then run the request. The Playground uses your real key, so its quota, permissions and restrictions apply.

If it works there, compare the request with your app’s request. Check the key, headers, parameter names and URL encoding.

Inspect the request in your API Logs

Open API Logs and filter Status to Errors. Narrow by key and date to find the call. Rows show time, type, status, latency, key, cost and endpoint. Open a row to see the query parameters and caller IP.

Compare the recorded parameters with the ones you intended to send.

The API logs page with per-request rows and error-rate and latency stats used to find a failing call

Common gotchas to check first

Common Questions

Why does the same request work in the Playground but not in my code?

Compare the key and its x-apitube-mode, authentication header, endpoint and parameters. Check URL encoding for spaces, quoted phrases and dates. Also check whether the two requests come from different IPs with different permissions.

How do I send enough detail for support?

Include the request_id or X-Request-ID, full error response, endpoint, HTTP method and time. Remove your API key from anything you share.

Can I see the exact request my code sent?

Yes. Open the call in API Logs to see the endpoint and query parameters alongside its status, latency and IP. Compare them with your intended request.


Related Articles