No logo available for Bullhorn-api to DuckDB connector icon

Load Bullhorn-api data to DuckDB

Build a Bullhorn-api to DuckDB pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Bullhorn-api API base URL, auth, endpoints, and incremental loading.

SourceBullhorn-apiAPI ReferenceDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

Bullhorn REST API provides programmatic access to staffing and CRM data, including candidates, jobs, and placements. Everything needed to build a working Bullhorn-api → DuckDB pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.


Build your Bullhorn-api to DuckDB pipeline

Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.

Prompt
Run uvx dlthub-init@latest to build a pipeline from Bullhorn-api to DuckDB and run it on dltHub

That scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the Bullhorn-api API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →

Prefer to write it yourself? Every fact the agent uses is below.


Bullhorn-api API at a glance

Base URLhttps://rest.bullhornstaffing.com/rest-services/ (initial); subsequent requests use a dynamic, swimlane-specific base URL returned by the login endpoint.
Example endpointGET query/{entityType}
Records found atdata
Authenticationall requests require a session-based BhRestToken header — sent in the BhRestToken header
PaginationOffset-based via start, page size via count. The Bullhorn REST API uses an offset-based pagination strategy. Developers must use the 'start' (offset) parameter in conjunction with 'count' (page size). The API does not use a next page token. Standard iteration involves incrementing the 'start' parameter by the 'count' value until the response contains fewer records than the requested 'count'. The maximum allowed 'count' is generally 500.
Incremental fielddateLastModified
Record idid
API referencehttps://bullhorn.github.io/rest-api-docs/

These values come from the Bullhorn-api API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the Bullhorn-api API?

Authentication involves a multi-step OAuth 2.0 flow to obtain an access token, which is then exchanged for a 'BhRestToken' session token via a login call. This session token must be included in all subsequent API requests, either as an HTTP header named 'BhRestToken', a query parameter, or a cookie.

1. Get your credentials

Bullhorn REST API credentials (OAuth Client ID, Client Secret, and API Username) are not self-service. To obtain them, you must submit a support ticket via the Bullhorn Resource Center. In your ticket, specify that you are requesting OAuth credentials, provide your developer contact details, the purpose (e.g., dlt integration), and the target environment (e.g., Staging or Production). Once processed, Support will provide the Client ID and Client Secret, and you will need to generate a password for the API user.

2. Add them to .dlt/secrets.toml

[sources.bullhorn_api_source] access_token = "your_oauth_access_token_here" BhRestToken = "your_bh_rest_token_here"

dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.


What Bullhorn-api data can I load into DuckDB?

These are the Bullhorn-api endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
queryquery/{entityType}GETdataExecute a JPQL-like query to retrieve entities
searchsearch/{entityType}GETdataSearch indexed entities using Lucene syntax
entityentity/{entityType}/{id}GETdataRetrieve a single entity by ID
metameta/{entityType}GETRetrieve entity schema metadata
event_logevent/subscription/{subscriptionId}/eventsGETeventsRetrieve events for a subscription

How do I load only new Bullhorn-api records?

Bullhorn-api exposes dateLastModified on query/{entityType}, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.

{"name": "query", "endpoint": { "path": "query/{entityType}", "data_selector": "data", "incremental": {"cursor_path": "dateLastModified", "initial_value": "2024-01-01T00:00:00Z"}, }}

On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.


What does the generated Bullhorn-api pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading entity/Candidate and entity/JobOrder from the Bullhorn-api API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def bullhorn_api_source(bhresttoken=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://rest.bullhornstaffing.com/rest-services/ (initial); subsequent requests use a dynamic, swimlane-specific base URL returned by the login endpoint.", "auth": {"type": "api_key", "api_key": bhresttoken, "name": "BhRestToken"}, }, "resources": [ {"name": "query", "endpoint": {"path": "query/{entityType}", "data_selector": "data"}}, {"name": "search", "endpoint": {"path": "search/{entityType}", "data_selector": "data"}} ], } yield from rest_api_resources(config) def load_bullhorn_api_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="bullhorn_api_pipeline", destination="duckdb", dataset_name="bullhorn_api_data", ) load_info = pipeline.run(bullhorn_api_source()) print(load_info) if __name__ == "__main__": load_bullhorn_api_to_duckdb()

Run it with python bullhorn_api_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.


How do I query Bullhorn-api data in DuckDB?

dlt creates one table per resource. Query the loaded data with Python or SQL — or ask your agent to, through the MCP server's execute_sql_query tool.

Python (pandas DataFrame):

import dlt data = dlt.pipeline("bullhorn_api_pipeline").dataset() df = data.query.df() print(df.head())

SQL:

SELECT * FROM bullhorn_api_data.query LIMIT 10;

See querying your data with dataset and exploring it in marimo notebooks.


How do I deploy the Bullhorn-api to DuckDB pipeline in production?

The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.

  • Deploy & schedule — run the pipeline as a managed job with automatic retries.
  • Monitor — observable job queues, alerting, and load metrics for every run.
  • Transform — promote raw Bullhorn-api loads into governed, documented models.
  • Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.

Book a demo →


What other destinations can I load Bullhorn-api data to?

dlt loads into any of these — only the destination argument changes:

DestinationExample value
PostgreSQL"postgres"
BigQuery"bigquery"
Snowflake"snowflake"
Redshift"redshift"
Databricks"databricks"
Filesystem (S3, GCS, Azure)"filesystem"

Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.


Next steps

Was this page helpful?

Community Hub

Need more dlt context for Bullhorn-api to DuckDB?

Request dlt skills, commands, AGENT.md files, and AI-native context.