Debugging

Options to debug the API

General API debugging tips:

  • Log both the request and the response.
  • If you receive an HTTP error, your input is likely the problem.
  • If you cannot access our API, your IP is likely blacklisted.

Live Debugging

The easiest way to debug is by using our frontends, which act as clients to the APIs:

You can open your browser’s Developer Tools (F12) and inspect the Network tab to see the API requests being made. This allows you to review the exact input parameters sent and the data returned from the APIs.

Common HTTP Errors

HTTP 400 Bad Request

This is a common error returned by the Search API and Leaks API if the input data is invalid. This could indicate a missing parameter, invalid encoding, formatting or other invalid input.

HTTP 401 Unauthorized

This indicates a missing or invalid API key, or lack of access for the requested endpoint. The API key must be provided either in the x-key HTTP header, or in the &k= URL parameter.

HTTP 403 Forbidden

This could indicate that our application firewall is blocking the request.

The Search API may return this error for /file/ requests if the requested data is unavailable for the API key.