Search1API
Essentials

Error handling

Handle Search1API authentication, payment, validation, rate-limit, and upstream errors.

Most API errors are JSON objects with ok: false and either error, message, or both. Validation errors also include an errors array.

{ "error": "Unauthorized: Invalid API Key", "ok": false }

Status codes

StatusMeaningWhat to do
400Malformed JSON or an invalid request value handled outside schema validationFix the request body and headers.
401Invalid, revoked, or malformed bearer tokenCheck the key and the Authorization header.
402Payment challenge or insufficient account creditsAdd a bearer token, complete the payment flow, or add credits.
404No search results, or a deepcrawl task was not foundTreat search 404 as zero results; verify a deepcrawl task ID before polling again.
410A discontinued reasoning endpointRemove calls to /v1/chat/completions and /v1/models.
422Request body failed schema validationRead the errors array and fix the named fields.
429More than 200 requests per minute on one keyBack off and retry.
502An upstream service failed or timed outRetry with backoff.
500An unexpected gateway or service errorRetry; contact support if it persists.

Understand 402 responses

A paid endpoint can return 402 for two different reasons.

No bearer token

Search1API supports pay-per-request payment protocols. A request without a bearer token receives a payment challenge such as:

{
  "type": "https://paymentauth.org/problems/payment-required",
  "title": "Payment Required",
  "status": 402,
  "detail": "Payment is required (Search1API - Search API)."
}

If you intended to use account credits, add Authorization: Bearer YOUR_API_KEY. A bearer token that is present but invalid returns 401 instead.

Not enough credits

When a request succeeds but its final cost is higher than the remaining balance, billing replaces the success response with 402 and an insufficient-credits message. Check the balance with GET /usage or add credits from the dashboard.

Fix validation errors

Search and news validation failures return 422 with an errors array:

{
  "ok": false,
  "message": "Query cannot be empty",
  "errors": [
    { "field": "query", "message": "Query cannot be empty", "code": "too_small" }
  ]
}

Common causes include an empty query, max_results below 1, or crawl_results greater than max_results. See the endpoint's API reference for its complete schema.

Treat a search 404 as zero results

/search and /news return 404 when the upstream search completes but finds no results. This is not a service outage, and the request is not charged. Broaden the query or remove narrow site and time filters.

Retry safely

Search and crawl requests have no write-side effects. Retry 429, 502, and transient 500 responses with exponential backoff and jitter. Do not retry 400, 401, 402, or 422 until you have changed the request or account state.

Failed requests are not charged. In a batch request, successful items are charged and failed items have a cost of zero.

If a 500 or 502 persists, contact sys@search1api.com with the endpoint, timestamp, and a redacted request body. Never send your API key.

On this page