Official SDKs
Use the official TypeScript and Python clients for typed requests, errors, retries, batches, and deepcrawl polling.
The official SDKs are the shortest path for application code that calls Search1API repeatedly. They cover every endpoint in the public OpenAPI contract and add language-native configuration, typed responses, error classes, safe retries, and deepcrawl polling.
Use MCP when an AI client should call Search1API as a tool. Use an SDK when your own TypeScript or Python application makes the calls.
TypeScript
npm install @search1api/clientimport { Search1API } from '@search1api/client';
const client = new Search1API({
apiKey: process.env.SEARCH1API_API_KEY,
});
const response = await client.search('latest AI agent frameworks', {
maxResults: 10,
crawlResults: 3,
});
for (const result of response.results) {
console.log(result.title, result.link);
}The TypeScript package supports Node.js 18+ and other runtimes with a
standards-compatible fetch implementation.
View the TypeScript SDK source on GitHub.
Python
pip install search1apifrom search1api import Search1API
client = Search1API() # reads SEARCH1API_API_KEY
response = client.search(
"latest AI agent frameworks",
max_results=10,
crawl_results=3,
)
for result in response["results"]:
print(result["title"], result["link"])An asynchronous client exposes the same operations:
from search1api import AsyncSearch1API
async with AsyncSearch1API() as client:
response = await client.search("latest AI agent frameworks")View the Python SDK source on GitHub.
Deepcrawl without hand-written polling
Both SDKs provide a convenience method that starts the task and waits until it completes.
const result = await client.deepcrawl('https://example.com', { type: 'all' });
console.log(result.zipUrl);result = client.deepcrawl("https://example.com", type="all")
print(result["zipUrl"])Use the separate start, status, and wait methods when the task ID needs to be persisted by your application.
Errors, retries, and timeouts
The SDKs expose separate errors for authentication (401), payment or credits
(402), validation (400/422), not found (404), rate limits (429), and
server failures. The status code and parsed response body remain available on
the error.
Requests use a 30-second timeout and retry 429 and transient 5xx responses
twice by default. Authentication, payment, and validation errors are never
retried. Starting a deepcrawl task is also not retried automatically because a
lost response could otherwise create and charge a duplicate task. Configure
the defaults on the client when your workload needs a different policy.
API coverage
The first-party clients support search and news (single and batch), crawl (single and batch), sitemap, trending, extract, deepcrawl, usage, and health. The generated OpenAPI types are also exported from the TypeScript package for applications that need the exact wire-level contract.