Skip to main content
Agents & LLMs: a Markdown version of this page is available by appending .md to the URL, and the full documentation index is at llms.txt.
blitz-api-py is the official, typed Python SDK for BlitzAPI. It ships sync and async clients over httpx, Pydantic v2 response models, TypedDict request filters, and a py.typed marker so mypy/pyright see the types in your own code. Retries, client-side rate limiting per endpoint and auto-pagination are built in.

PyPI

blitz-api-py on the Python Package Index.

GitHub

Source, changelog, and issues.

Install

Requires Python 3.10+.

Quickstart

Authentication

Pass the key explicitly or via the BLITZ_API_KEY environment variable. It is sent in the x-api-key header on every request.
Never expose your API key in client-side code (browsers, mobile apps). Always call BlitzAPI from your backend.

Async

Use AsyncBlitzAPI for async/await. Every method mirrors the sync client.

Endpoints

All methods are grouped into seven namespaces. Enum-backed filter fields (e.g. Industry, JobLevel, Continent) accept either an enum member or a raw string.

client.account

client.jobs

client.company

client.enrichment

client.utils

client.changelog

Pagination

The list methods (search.people, search.companies, search.employee_finder, jobs.search, jobs.company, company.tam_by_jobs, company.tam_by_people) return an auto-paginating page: iterate it and the SDK fetches each subsequent page for you.
See Pagination for max_items, manual paging, page metadata, and how each result counts as a record.

Usage & rate limit

Every metered /v2 response carries a fair_usage block: the records the call used, what is left on the plan, your rate-limit headroom, and a request id to quote to support. Read it to meter a long run without extra key_info() calls.
InsufficientRecordsError (402) carries the block too, so you can read next_reset_at without a second call. Only the public changelog.list(), which is not metered, doesn’t return it. account.key_info() returns it with records_used at 0 and no rate_limit, since that endpoint is not rate limited.

Configuration

A single client instance stays under your per-endpoint request-per-second limit and retries automatically on 429; see Rate limits & retries. rate_limit_rps defaults to 5; set it to your key’s max_requests_per_seconds to use your plan’s full per-endpoint throughput. Each method also accepts a per-call timeout:

Error handling

401 / 402 / 404 raise immediately; 429 and 5xx are retried automatically; read timeouts surface as APITimeoutError (not retried). A 401 with a valid key means the endpoint is not in the key’s allowed_apis (“You do not have access to this route”); list them with client.account.key_info().allowed_apis. Catch InsufficientRecordsError for a 402: the old InsufficientCreditsError alias was removed in 4.0.0. See Rate limits & retries for the full retry and timeout behavior. A 400 or 422 also raises immediately, as APIStatusError. For a 422, err.body["errors"] lists each invalid field as {"field": ..., "message": ...}; see Errors.

Types & enums

Response models are Pydantic v2 objects with attribute access and IDE autocomplete. Enum helpers live in blitz_api.types:
Enum-backed fields accept an enum member or a raw string, so a value missing from the vendored taxonomy never blocks you. New fields the API adds are preserved on the parsed model rather than breaking deserialization.

Next steps

TypeScript / JavaScript SDK

The same API surface for Node and the browser-adjacent runtimes.

Field Normalization

Accepted values for industry, job level, job function, and geography filters.

API reference

Full request/response schemas and an interactive try-it console.

Recipes

End-to-end workflows: build an ICP list, enrich it, and sync to your CRM.