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 withasync/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 rawhttpx.Response.- Retries: 429/5xx with capped exponential backoff honoring
Retry-After(max_retries=to tune,0to disable). - Config:
api_key=/CAESAR_API_KEYis required for the public API;base_url=/CAESAR_BASE_URLmay point at a self-hosted deployment.
Errors
CaesarError → APIConnectionError / APITimeoutError and APIStatusError (with .status_code, .code, .message, .request_id) → AuthenticationError (401/403), MissingAPIKeyError (local missing_api_key preflight), RateLimitError (429).
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file caesar_search-0.3.0.tar.gz.
File metadata
- Download URL: caesar_search-0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
977c90d6dc34ef8fdf86c03efaf4f6896d5d126e36c855db0a46aaad3239e281
|
|
| MD5 |
d54798165531e26a5f4f802b9ecd98e1
|
|
| BLAKE2b-256 |
50f470196454c3cf5ca13548c6389e84e6644a16b4a78135ad4939a25289a37a
|
Provenance
The following attestation bundles were made for caesar_search-0.3.0.tar.gz:
Publisher:
release.yml on caesar-data/caesar-search-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caesar_search-0.3.0.tar.gz -
Subject digest:
977c90d6dc34ef8fdf86c03efaf4f6896d5d126e36c855db0a46aaad3239e281 - Sigstore transparency entry: 2168170129
- Sigstore integration time:
-
Permalink:
caesar-data/caesar-search-python@431b100d5218566e34c8c5a5ef49de6603cedacd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/caesar-data
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@431b100d5218566e34c8c5a5ef49de6603cedacd -
Trigger Event:
push
-
Statement type:
File details
Details for the file caesar_search-0.3.0-py3-none-any.whl.
File metadata
- Download URL: caesar_search-0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5857a26bfcf6b6d214ce207d10a2805f470623d5b1dcefefe1aab7f7fb84ce8a
|
|
| MD5 |
2b549ce7def88d9c27ca28c6fccf5d51
|
|
| BLAKE2b-256 |
62d59ceead57e89c02e9cf6609e5f4499296c792a59a18d70c51c82703b24964
|
Provenance
The following attestation bundles were made for caesar_search-0.3.0-py3-none-any.whl:
Publisher:
release.yml on caesar-data/caesar-search-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caesar_search-0.3.0-py3-none-any.whl -
Subject digest:
5857a26bfcf6b6d214ce207d10a2805f470623d5b1dcefefe1aab7f7fb84ce8a - Sigstore transparency entry: 2168170145
- Sigstore integration time:
-
Permalink:
caesar-data/caesar-search-python@431b100d5218566e34c8c5a5ef49de6603cedacd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/caesar-data
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@431b100d5218566e34c8c5a5ef49de6603cedacd -
Trigger Event:
push
-
Statement type: