Seltz Python SDK
Official Python SDK for Seltz, the Web search engine for AI agents.
💾 Installation
pip install seltz
Requires Python 3.9 or higher.
⚡️ Quick Start
from seltz import Seltz
client = Seltz(api_key="your-api-key")
# Search the Web
response = client.search("best ai search engines", max_results=10)
# Access results
for document in response.documents:
print(f"URL: {document.url}")
print(f"Content: {document.content}")
Output:
URL: https://www.best-ai-search-engines.com
Content: Generative AI can make finding information faster and more intuitive.
If you’re tired of traditional search, explore some of the best AI-powered
search engines we've tested...
Answer
Get a natural-language answer grounded in Web search results, with citations:
from seltz import Seltz
client = Seltz(api_key="your-api-key")
response = client.answer("Who is Apple's next CEO?")
print(response.answer)
for citation in response.citations:
print(f"Source: {citation.url}")
Pass model to pick an answer tier. It defaults to seltz-base; seltz-pro runs agentic RAG over a single grounding search:
response = client.answer("Who is Apple's next CEO?", model="seltz-pro")
Pass response_format (an OpenAI-style object) to get structured output. response.answer then carries a JSON string matching your schema instead of Markdown; response.citations are still returned:
response = client.answer(
"Who is Apple's next CEO?",
response_format={
"type": "json_schema",
"json_schema": {
"name": "news_summary",
"schema": {
"type": "object",
"properties": {"summary": {"type": "string"}},
"required": ["summary"],
"additionalProperties": False,
},
},
},
)
import json
print(json.loads(response.answer)["summary"])
Pass system_prompt to steer how the answer is presented — tone, voice, format:
response = client.answer(
"Who is Apple's next CEO?",
system_prompt="Answer in British English. Open with a one-line summary, then the detail.",
)
Answer (streaming)
Stream an answer as it is generated, instead of waiting for the full response. answer_stream yields events as they arrive: a citations event first, then text_delta chunks, then a terminal finish_reason. Inspect each event with event.WhichOneof("event"):
from seltz import Seltz
client = Seltz(api_key="your-api-key")
for event in client.answer_stream("Who is Apple's next CEO?"):
kind = event.WhichOneof("event")
if kind == "citations":
for citation in event.citations.citations:
print(f"Source: {citation.url}")
elif kind == "text_delta":
print(event.text_delta, end="", flush=True)
elif kind == "finish_reason":
print()
Streaming is also available asynchronously via AsyncSeltz — async for over the events:
import asyncio
from seltz import AsyncSeltz
async def main():
async with AsyncSeltz(api_key="your-api-key") as client:
async for event in client.answer_stream("Who is Apple's next CEO?"):
kind = event.WhichOneof("event")
if kind == "citations":
for citation in event.citations.citations:
print(f"Source: {citation.url}")
elif kind == "text_delta":
print(event.text_delta, end="", flush=True)
elif kind == "finish_reason":
print()
asyncio.run(main())
Async
The same API is available asynchronously via AsyncSeltz — await each call:
import asyncio
from seltz import AsyncSeltz
async def main():
client = AsyncSeltz(api_key="your-api-key")
response = await client.search("best ai search engines", max_results=10)
for document in response.documents:
print(f"URL: {document.url}")
print(f"Content: {document.content}")
asyncio.run(main())
To close the connection deterministically rather than leaving it to garbage collection, use AsyncSeltz as an async context manager (async with) or call await client.close() when done.
📚 Documentation
Browse the documentation for more details.
Metadata
Release files for seltz 1.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seltz-1.10.0.tar.gz | 40.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seltz-1.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.2 kB
Release files / seltz-1.10.0.tar.gz
| Download URL | seltz-1.10.0.tar.gz |
|---|---|
| Size | 40.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f2e2adae3df9a18ce79c1493573163e0d7ef05ba9193dd7eafb53b636d2cc6a
|
|
BLAKE2b-256 checksum How to use checksums |
131b85336515ff4893d3c6c12b68f3753cbdebd020f8ac66f7a6c8e1afa2cde4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logRelease files / seltz-1.10.0-py3-none-any.whl
| Download URL | seltz-1.10.0-py3-none-any.whl |
|---|---|
| Size | 33.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
530edf99104f6da7ad404dbd78c342fed34896a5295555d2666517b40e764b7e
|
|
BLAKE2b-256 checksum How to use checksums |
cc73f889197024092163771a2b359f006dd7b73366cdc1ae04743403b3dc6342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency log