Skip to main content

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=dict anywhere 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, and pydantic.
Source: HireBase-1/hirebase-python-sdk. Looking for end-to-end, copy-paste workflows by role? See SDK Examples.

Installation

Optional extras:

Authentication

Pass your API key directly, or set it via the environment:
Resolution order for every setting is argument → environment variable → default. The base URL defaults to https://api.hirebase.org.

Quickstart

Booleans are accepted natively (visa=True) and converted to the API’s string form for you. locations is a friendly alias for the API’s geo_locations. Unknown filter keys are passed through untouched, so new API features work before the SDK is updated.

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 plain dict or build a typed query:
Hybrid semantic + lexical search. Send a natural-language query under vector and structured filters under lexical:
SDK convenience shortcuts map to REST fields under the hood — they’re not separate REST params:

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).
You can also stream directly from the export URL without saving to disk (JSON Lines exports only):

Historical Jobs

Research past hiring from the jobs_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.
Typed bodies are available as JobContactsRequest and ContactRevealRequest. See Hiring Manager Contacts and Reveal Contact for pricing and result fields.

Companies

Typed company filters are available via 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 of m_salary_benchmarks per request (3/month on Free, 25 on API plans).
Pass 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

Nothing is stored when you use 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 carries Hirebase-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:
Without the flag the return shape is unchanged, so existing code keeps working. When a hard-capped plan is out of allowance the API refuses the call with a 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. Pass return_type=dict to get the raw API payload instead:

Error Handling

All errors subclass hirebase.HirebaseError:

License

This SDK is distributed under the MIT License.