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 the Blitz API. 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.
from blitz_api import BlitzAPIfrom blitz_api.types import Industry, JobLevel# api_key defaults to the BLITZ_API_KEY environment variable.with BlitzAPI() as client: # Health-check the key before a batch job. info = client.account.key_info() print(info.valid, info.remaining_credits, info.max_requests_per_seconds) # LinkedIn profile URL -> verified work email. email = client.enrichment.email( person_linkedin_url="https://www.linkedin.com/in/example-person", ) if email.found: print(email.email) # Search people with typed, autocompleted filters. people = client.search.people( company={"industry": {"include": [Industry.SOFTWARE_DEVELOPMENT]}}, people={"job_level": [JobLevel.VP]}, max_results=10, ) for person in people.results: print(person.full_name, person.headline)
All methods are grouped into four namespaces. Enum-backed filter fields (e.g. Industry, JobLevel, Continent) accept either an enum member or a raw string.
# Current server date/time.now = client.utils.current_date()# Company employees grouped by country.distribution = client.utils.company_employment_distribution( company_linkedin_url="https://www.linkedin.com/company/openai",)
The search methods (people, companies, employee_finder) return an auto-paginating page — iterate it and the SDK fetches each subsequent page for you.
# Stream every match across all pages — no cursor handling needed.for person in client.search.people(people={"job_level": ["VP"]}): print(person.full_name)
See Pagination for max_items, manual paging, page metadata, and the per-result billing caveat.
client = BlitzAPI( api_key=None, # falls back to BLITZ_API_KEY base_url="https://api.blitz-api.ai", timeout=30.0, # seconds, or an httpx.Timeout max_retries=3, # retries on 429 / 5xx / network errors rate_limit_rps=5.0, # client-side throttle; None to disable)
A single client instance stays under your key’s request-per-second limit (rate_limit_rps, default 5) and retries automatically on 429 — see Rate limits & retries. Each method also accepts a per-call timeout:
from blitz_api import ( BlitzError, AuthenticationError, InsufficientCreditsError, NotFoundError, RateLimitError, APIStatusError, APIConnectionError, APITimeoutError, APIResponseValidationError,)try: client.enrichment.email(person_linkedin_url="...")except InsufficientCreditsError: ... # 402 — out of creditsexcept AuthenticationError: ... # 401 — bad keyexcept APIStatusError as err: print(err.status_code, err.message, err.body)except APIResponseValidationError: ... # 2xx whose body didn't match the modelexcept BlitzError: ... # base class for everything this SDK raises
401 / 402 / 404 raise immediately; 429 and 5xx are retried automatically; read timeouts surface as APITimeoutError (not retried). See Rate limits & retries for the full retry and timeout behavior.
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.