Hirebase Python SDK
A lean, typed Python client for the Hirebase API (hirebase 0.2.2 on PyPI) — search jobs and companies, run market insights, embed resumes, and export job data at scale.
- Sync and async clients (
hirebase.Client/hirebase.AsyncClient). - Typed by default — responses come back as Pydantic models; pass
return_type=dictanywhere for raw dicts. - Streaming exports — kick off an export, poll it, download it, and stream millions of jobs with constant memory.
- Self-contained — ships its own types and depends only on
requests,httpx, andpydantic.
Source: HireBase-1/hirebase-python-sdk. Looking for end-to-end, copy-paste workflows by role? See SDK Examples.
Installation
Authentication
Pass your API key directly, or set it via the environment:https://api.hirebase.org.
Quickstart
Async
Every method has the same signature on both clients — the async versions are awaitable.Jobs
Every job returned by
search, neural_search, companies.jobs, and export costs one unit of your jobs allowance, so limit is your spend per call. See Usage Headers & Metering.Typed inputs
Pass a plaindict or build a typed query:
Neural Search
Hybrid semantic + lexical search. Send a natural-language query undervector and structured filters under lexical:
SDK convenience shortcuts map to REST fields under the hood — they’re not separate REST params:
neural_search(text=...)→ RESTvector.queryneural_search(company_slug=..., job_slug=...)→ resolves the slug viaGET /v2/hirebase/companies/{slug}/jobs/{job_slug}, then sendsvector.job_idsneural_search(resume_id=...)→ RESTvector.artifact_id(the_idfrom Upload Resume)
Resume → Job Matching
There are two paths. Stateless:resumes.embed returns only an embedding (nothing stored) — pass it straight into neural search via vectors. Stored: resumes.upload_and_parse persists the resume and returns an id you can reuse as the artifact_id (see Upload Resume). The stateless flow:
Exporting Jobs (async task flow)
Exports are processed server-side and returned as a downloadable file.Task terminal state is
finished (not completed). poll() accepts a Task, a task dict, or a task id, plus interval, timeout, and an on_progress callback. The result dict contains download_url, file_size, record_count, and expiry_time. JSON exports are NDJSON (one job object per line).Historical Jobs
Research past hiring from thejobs_expired archive. Discovery is free and returns counts, a by-year breakdown, top companies, sample titles, and a price quote; the export ships every matching full record and is paid per record through Stripe Checkout, never from your monthly jobs allowance. See the Historical Jobs guide.
Only filters the archive index can evaluate are accepted (titles, keywords, geo, company, date ranges); anything else returns
422. format is "json" (NDJSON) or "csv". Pass redirect_to= to send the buyer back to your own page after Checkout.Hiring Manager Contacts
Requires the Hiring Manager API add-on on your key. Research returns the likely hiring managers and recruiters behind one posting (name, role, LinkedIn profile); work email and phone are optional reveals billed only when found.JobContactsRequest and ContactRevealRequest. See Hiring Manager Contacts and Reveal Contact for pricing and result fields.
Companies
CompanyQuery (e.g. industries, types, hq_geolocations). Industry/subindustry value lists come from the REST reference-data endpoints (List Industries).
Salary Benchmark
Queue a posted-salary report and poll the task for the result. One unit ofm_salary_benchmarks per request (3/month on Free, 25 on API plans).
public_url="https://..." instead of role attributes to benchmark an existing posting, or salary_range={...} to see what percentile a proposed range sits at. See Salary Benchmark.
Resumes
client.resumes.embed(...) (see above); upload keeps the file so it can be re-parsed and matched later.
Tasks
Usage and quota
Fetch the current period’s usage the same way the dashboard does:Tracking quota without polling
Every metered response carriesHirebase-Usage-* headers. Pass return_meta=True to any metered method (jobs and companies, sync or async) to get them back alongside the result as a ResponseMeta:
429 that is not a rate limit, so backing off will not help. The SDK raises QuotaExceededError (a subclass of RateLimitError, so existing handlers keep working) with the snapshot attached:
Typed vs. dict responses
Every method returns typed models by default. Passreturn_type=dict to get the raw API payload instead:
Error Handling
All errors subclasshirebase.HirebaseError: