Skip to main content

Official Python SDK for the Caesar search API — web search with provenance, built for agents.

Project description

caesar-search (Python)

Official Python SDK for the Caesar search API — web search with provenance, built for agents.

Quickstart

# pip install caesar-search    (or: uv add caesar-search)
from caesar_search import Caesar

client = Caesar()  # requires CAESAR_API_KEY (get one at app.trycaesar.com)
results = client.search("rust async runtime comparison", max_results=5)
doc = client.read(results.results[0].doc_id, query="which runtime is fastest")
client.feedback("result_helpful", search_id=results.search_id, doc_id=doc.doc.doc_id)

Clients

  • Caesar — synchronous; AsyncCaesar — same surface with async/await. Both support context managers.
  • Methods: search(), read() (doc_id or URL; start_char= continues truncated reads), feedback().
  • Responses are typed pydantic v2 models generated from the public OpenAPI spec; provenance fields (doc_id, search_id, capture_id, canonical/source URLs, crawl dates) are preserved verbatim.
  • client.with_raw_response.search(...) returns the raw httpx.Response.
  • Retries: 429/5xx with capped exponential backoff honoring Retry-After (max_retries= to tune, 0 to disable).
  • Config: api_key= / CAESAR_API_KEY is required for the public API; base_url= / CAESAR_BASE_URL may point at a self-hosted deployment.

Errors

CaesarErrorAPIConnectionError / APITimeoutError and APIStatusError (with .status_code, .code, .message, .request_id) → AuthenticationError (401/403), MissingAPIKeyError (local missing_api_key preflight), RateLimitError (429).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caesar_search-0.4.0.tar.gz (84.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caesar_search-0.4.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file caesar_search-0.4.0.tar.gz.

File metadata

  • Download URL: caesar_search-0.4.0.tar.gz
  • Upload date:
  • Size: 84.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caesar_search-0.4.0.tar.gz
Algorithm Hash digest
SHA256 59c8f42a44c3043b74ce8d6bd003babebc3bc7ac24793f90cbefedf623a89171
MD5 273e381a20e1a5c2323d30224e4bd3e6
BLAKE2b-256 99966c0120fa4dfd52b8a99cddd7d96acb5aeaccde05888edd2c36d7c0341e76

See more details on using hashes here.

Provenance

The following attestation bundles were made for caesar_search-0.4.0.tar.gz:

Publisher: release.yml on caesar-data/caesar-search-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caesar_search-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: caesar_search-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caesar_search-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a33449840165fa5fe370e26ad117144b208065790953d921e1b3c8bba4326450
MD5 f58cbb8934f3aa1ad08c36c5e7909fef
BLAKE2b-256 c54718dbaabc6c4c1312d7b333359b0bbe177f2b01be6bf4c57bdaa207717a80

See more details on using hashes here.

Provenance

The following attestation bundles were made for caesar_search-0.4.0-py3-none-any.whl:

Publisher: release.yml on caesar-data/caesar-search-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page