The Desearch Python SDK wraps common Desearch API calls so Python applications can search, retrieve results, and read billing metadata without hand-writing every HTTP request.
Do not hardcode production API keys. Store them in environment variables or a secret manager.
When the SDK returns raw response metadata or exposes headers, read request cost from X-Desearch-Cost-Usd. For JSON object responses, the API may also include:
Arrays, text responses, and streaming responses keep their original body shape, so use headers for cost metadata.
401 — check DESEARCH_API_KEY and whether the key is active in Console.422 — check parameter names, enum values, and endpoint-specific required fields.429 — reduce concurrency or check account limits.For the full generated method list and schemas, use the API Reference.