API DOCUMENTATION / MCP TOOLS

MCP tools

Every tool on the Headcount Labs MCP server (28 after sign-in, 9 keyless), what it does, the scope it needs, whether it uses records, and which call to make for common requests.

Tools

The MCP server at https://api.headcountlabs.com/mcp has 28 tools after you sign in; the ChatGPT and Claude directory listings show 27 (they leave out the legacy set_overage control). Without signing in, only search_docs works on that URL. A separate keyless endpoint, https://api.headcountlabs.com/mcp/public, has nine read-only tools: search_docs, search_jobs, get_job, count_jobs, market_lookup, market_breakdown, salary_range, market_dimensions and list_fields. market_insights is no longer served. Tools that return jobs, companies or change events count one record for each item returned, against your free monthly allowance and then the per-record prices; the Uses records column says which. Counts, field lists, docs, usage and file reads are free. The Access column gives each tool's OAuth scope. The Class column labels each tool the way AI assistant directories do: Read tools only return information, Write tools change a setting or create something on your account, and the one Sensitive write tool, set_overage, can lead to charges, so your assistant should ask you every time before it calls it. Every tool on /mcp/public is Read. Current metered billing is managed from the account Billing page; set_overage only applies to legacy policy-based monthly plans.

Paging. search_jobs, search_jobs_json, search_jobs_dsl, list_company_jobs, list_companies, search_companies and list_job_changes take two paging inputs. limit is the page size, a whole number from 10 to 100 (default 50). max_results is the most results one search returns across all its pages, a whole number from 10 to 1,000 (default 250). Set both on the first call and keep them the same on every page: the cursor carries them. A value outside the range is refused with a message that names the range. A search that reaches max_results returns next_cursor: null and a note; to read more, start a new search with a larger max_results or narrower filters. Each page is its own request and is charged for the results it returns, so spend caps and the confirmation level apply page by page. The keyless /mcp/public endpoint pages differently (see Endpoints and profiles).

Bulk downloads of the full job dataset are coming soon. Public subsets of it (ODbL 1.0) are at https://huggingface.co/HeadcountLabs.

ToolUses recordsAccessClassWhat it doesExample prompts
search_docsNoNo sign-in needed. Also on /mcp/public.ReadAnswers a question about Headcount Labs (filters, limits, pricing, MCP setup, errors) with the best-matching sections of the headcountlabs.com docs, each with its URL. Input: question (up to 500 characters) and limit (1 to 10, default 5). It is the one tool that works before you sign in.“How do I filter Headcount Labs jobs by pay?”
“What happens when I use up my free records?”
search_jobsYes. One record per job it returns, including every job written to a file.jobs:read. A smaller version is on /mcp/public.ReadSearches jobs with any /v1/jobs filter (about 55 names; list_fields lists them), passed in filters; remote: true is shorthand for work_arrangement: "remote". Other inputs: fields (top-level job properties, job_id is always included), limit (the page size, 10 to 100, default 50), max_results (the most jobs one search returns across all its pages, 10 to 1,000, default 250; set it on the first call, the cursor keeps it; with descriptions: "full" the page size is 10 to 25), cursor, sort (relevance, updated or random), seed (repeat a random order), descriptions (snippet by default, cut to 400 characters with description_truncated: true; full returns the whole text), view (compact by default; full returns every field, see Compact results below) and confirmed. Each result has a usage object with jobs_used_this_call and the jobs you have left. For a large result set, pass deliver_file: true and max_jobs (1 to 5,000, default 1,000): the jobs are written to a JSONL file with a download link that works for one hour, a file_id for read_file, and a 25-job preview. If one search would return more than your confirmation level (25% by default), the call stops with confirmation_required and your agent asks you first. On /mcp/public the inputs are filters, fields, limit (1 to 50, default 10; 1 to 10 when descriptions is full), cursor, sort (relevance or updated) and descriptions, and one search returns at most 250 jobs.“Find remote data engineer jobs in Germany posted this week.”
“Get every open nursing job in Texas as a file.”
get_jobYes. One record.jobs:read. Also on /mcp/public.ReadReturns one job by its job_id, with every linked posting and its source URLs. include_source_data: true adds each posting's source data, and fields selects top-level properties. A merged job is followed to the job it merged into (up to 5 hops).“Show me the full record for job 0b7c…, including every source posting.”
count_jobsNo. It returns a number, not records.jobs:read. Also on /mcp/public.ReadCounts jobs that match the same filters as search_jobs. Use it to size a search before fetching it. group_by: "employer" also returns the top 25 employers behind the matching jobs, each with employer_name, company_id and jobs.“How many software engineer jobs in Canada were posted since October 1?”
“Which companies are hiring the most nurses in Ohio?”
list_fieldsNoAny sign-in. Also on /mcp/public.ReadLists the search_jobs filters and the job fields whose name or description contains your keywords (up to 20 words; none lists everything), with each one's type and a short description. A field state says whether the source published the value, we derived it, the source left it out, or extraction failed.“Which filters can I use for pay and remote work?”
read_fileNo. The jobs were counted when the file was made.jobs:readReadReads jobs from a file that search_jobs delivered, by file_id, offset and limit (1 to 100, default 25), and returns a fresh one-hour download link. Descriptions are cut to 400 characters unless descriptions: "full"; the downloaded file always has them in full. Files last 24 hours.“Show me jobs 100 to 200 from the file you just made.”
market_lookupNoKeyless /mcp/public only. Signed in, use market_insights.ReadJob count, pay percentiles, share of jobs showing pay, remote/hybrid/in-person shares, posting age, new postings or top employers for up to two of title, place, company, seniority, employment type and remote. Leave metric out for every figure. Answers come from a daily snapshot of open US jobs and include an as_of date. For a current job count, use count_jobs. Cells with fewer than 30 jobs are left out. Inputs: title, role, place, company, seniority, employment_type, remote, metric.“What is the median pay for registered nurses in Texas?”
market_breakdownNoKeyless /mcp/public only. Signed in, use market_insights.ReadRanks one dimension (by: title, state, city, company, seniority, employment type or remote) by jobs, pay or another figure. Same daily snapshot and as_of date as market_lookup. Inputs: by, sort, limit, title, role, place, company, seniority, employment_type, remote.“Which states pay software engineers the most?”
salary_rangeNoKeyless /mcp/public only. Signed in, use market_insights.ReadPosted-pay percentiles (25th, 50th, 75th, 90th) and a recommendation for a title, a place (US if omitted) and an optional seniority. Same daily snapshot and as_of date. Cells with fewer than 30 jobs are left out. Inputs: title, role, place, seniority.“What salary should I ask for as a software engineer in Austin?”
market_dimensionsNoKeyless /mcp/public only. Signed in, use market_insights.ReadLists what market_lookup, market_breakdown and salary_range accept: the dimensions, how many values each has, and the metrics. Pass dimension and optionally q for the values of one dimension. Inputs: dimension, q, limit.“Which seniority values can I ask about?”
verify_jobsYes. Each sampled job counts as one record.jobs:readReadSpot-checks Headcount Labs data against the original postings. Picks sample_size random current jobs (1 to 50, default 20) that match optional filters, opens each posting page once (at most 2 pages a second, 10-second timeout, user agent HeadcountLabsVerifier) and reports whether the link works, whether the job is still open, and whether title, employer, location and pay match the page. A check is null when it could not be made. seed draws the same sample again; confirmed answers a confirmation prompt. Only the postings' own pages are fetched.“Spot-check 20 random jobs against their original postings.”
compare_sourcesYes. Each matched job counts as one record.jobs:readReadCompares your own job list with Headcount Labs. Pass rows (up to 500, each with url, or company, title and location) or text (up to 200,000 characters of CSV, TSV or one posting URL per line). Each row is matched by posting URL first, then by company, title and location, and gets a status: have_current, have_closed, have_unpublished or missing with a likely reason. Rows without a URL are matched for the first 50 different company and title pairs in a call. The list is used for this call only and is not stored.“Compare this CSV of our open roles with Headcount Labs.”
get_usageNojobs:read or usage:readReadReports your plan, records used, limits and windows, what remains of your allowance, when it resets, API requests used and left, your confirmation level and (on the full server) your overage status. It works when the allowance is used up.“How much of my Headcount Labs allowance is left?”
set_confirmation_levelNooverage:writeWriteSets the percent of your allowance that one search may return before search_jobs, verify_jobs or compare_sources asks you to confirm. Input: percent, a whole number from 0 to 100. The default is 25; 0 turns the question off; 100 asks only when a search would pass the whole allowance. Agents change it only when you ask.“Don't ask me before large searches any more.”
“Ask me before any search that uses more than 10% of my allowance.”
set_overageNooverage:write. Not on the ChatGPT and Claude directory listings.Sensitive writeTurns overage on or off and sets an optional monthly limit in dollars. Inputs: enabled and monthlyLimitUsd (the most overage may cost in a month, in dollars; null clears it). With overage off (the default), searches stop when your allowance is used up; with it on, usage past the allowance is billed at month end, until the limit is reached. Only accounts on older policy-based monthly billing have overage. Current metered billing is enrolled from the account Billing page, where the customer chooses a monthly USD spend cap; the Stripe billing portal manages payment methods and cancellation. Agents change it only when you ask.“Turn on overage so my searches keep working past my free records.”
“Don't let overage cost more than $25 a month.”
get_overageNousage:readReadReads whether overage is on, and the current usage and limit fields. It is a status read and costs nothing.“Is overage turned on for my account?”
search_jobs_jsonYes. One record per job returned (REST rules).jobs:readReadSends the public job filters as a JSON body to POST /v1/jobs/search: each filter is a top-level input, not nested in filters. Also takes limit (10 to 100, default 50), max_results (10 to 1,000, default 250), cursor, sort (relevance, updated or random), seed, fields, include (company, source_data) and description_format (text or html). Cursors and errors match the REST route; the page size and the per-search cap follow the paging rules above.“Search jobs with title nurse in Ohio and include the company record.”
search_jobs_dslYes. One record per job returned (REST rules).jobs:readReadRuns the supported Elasticsearch-style clauses through POST /v1/jobs/search/es_dsl. Inputs: query (the clause object), limit, max_results, cursor, sort (relevance or updated), fields, include and description_format. Unsupported clauses return invalid_request. See the query language.“Run this Elasticsearch-style query against the jobs.”
list_job_changesYes. One record per change event returned (REST rules).jobs:readReadReads the public change feed (GET /v1/jobs/changes): jobs that are new, updated or expired. Inputs: since or after (resume with the cursor from the last page, unchanged), type (any of new, updated, expired), company_id, limit (10 to 100, default 50), max_results (10 to 1,000, default 250; it counts changes while the feed has more, then the plain resume_cursor comes back with a note) and include (source_data). A stale or invalid cursor returns invalid_request.“What jobs expired since yesterday?”
list_companiesYes. One record per company returned.companies:readReadBrowses published company records. Inputs: name, format (json or csv), limit (10 to 100, default 50), max_results (10 to 1,000, default 250) and cursor (pass next_cursor unchanged).“List companies whose name starts with Sales.”
search_companiesYes. One record per company returned.companies:readReadSearches published companies by name, country (two letters) and status (active, retired or merged), with limit (10 to 100, default 50), max_results (10 to 1,000, default 250) and cursor.“Find active companies in Germany with data in the name.”
get_companyYes. One record.companies:readReadReads one company record by company_id. A merged company ID returns the API's redirect response.“Look up Salesforce's company record.”
list_company_jobsYes. One record per job returned.companies:readReadLists the published jobs of one company by company_id, with the same filters, limit, max_results, cursor, sort and fields as search_jobs_json.“Show open jobs at this company.”
create_job_exportYes. A completed export counts one record for every job it writes.jobs:readWriteStarts an asynchronous gzip JSONL export through POST /v1/jobs/exports. Takes the job filters as top-level inputs plus max_records (1 to 100,000), fields, include, description_format and sort. limit and cursor are rejected. Signed download links are never returned; read the files with read_job_export_file. To download the whole dataset instead, use the bulk download linked above.“Export every open nursing job in Texas.”
list_job_exportsNojobs:readReadLists up to 20 recent exports for the account. File links and signed secrets are left out.“Show my recent exports.”
get_job_exportNojobs:readReadReads the status and file list of one export by export_id.“Is export 7f3c… finished?”
read_job_export_fileNo. The jobs were counted when the export was made.jobs:readReadReads one file of a finished export, export_id and file_number, and returns the decompressed job records. A file holds up to 10,000 jobs.“Read file 1 of that export.”
get_usage_requestsNousage:readReadLists the account's API requests for a UTC window of at most 31 days: from and to (ISO times), limit (1 to 100, default 50), cursor, and filters route_class and api_key_id. Oversized reports return report_too_large.“Show my API requests from the last 24 hours.”
get_usage_analyticsNousage:readReadSummarizes the account's API requests for a UTC window of at most 31 days, optionally grouped (group_by: route_class, status_class or api_key_id).“Break down my API use this month by key.”
market_insightsNoAny sign-in. Not on /mcp/public (use the four market tools there).ReadJob-market figures from a daily snapshot of open US jobs, with an as_of date: pay, remote share, posting age and rankings. question picks a ready-made metric, a lookup, a breakdown, a salary ask or a dimensions list; other inputs are role, title, place, company, seniority, employment_type, remote, metric, by, sort, limit, dimension and q. Cells with fewer than 30 jobs are left out. For a live count use count_jobs.“What do data analysts earn in Chicago?”
get_job_historyNojobs:readReadReturns when a job was first seen, when each of its public postings was first seen, and the job's last update time, by job_id. Past versions of jobs are not served: the version list is empty and history_served is false. A merged job answers 410 with successor_job_id.“When was job 0b7c… first posted?”
count_cohort_jobsNojobs:readReadCounts one explicitly selected partial job cohort by cohortId, with facets and snapshot metadata. It is separate from count_jobs, accepts no other filters and makes no claim about the full or current catalog.“How many jobs are in cohort X?”

Endpoints and profiles

AddressWhat it is
https://api.headcountlabs.com/mcpThe full server. Needs OAuth sign-in. Without a token it answers 401 with a WWW-Authenticate header that points at the OAuth discovery document, except that a tools/call of search_docs is answered without signing in.
https://api.headcountlabs.com/mcp/publicNo sign-in and no key. Nine read-only tools (search_docs, search_jobs, get_job, count_jobs, market_lookup, market_breakdown, salary_range, market_dimensions, list_fields). market_insights is no longer served. No pricing wording, and no account or records used. One search returns at most 250 jobs, limit 1 to 50 per page, default 10 (1 to 10 with full descriptions), and no max_results (search_jobs then returns next_cursor: null with a note, or fails with search_limit_reached). Limits: 20 tool calls a minute and 1,000 a day per conversation, 600 a minute per network (shared by every conversation on it), and a site-wide daily budget; a refusal is rate_limited with retry_after_seconds. initialize returns the Mcp-Session-Id to send back.
https://api.headcountlabs.com/mcp?profile=chatgpt and ?profile=claudeThe listings for the ChatGPT and Claude directories: the same 25 tools without set_overage, and without pricing wording, upgrade_url or the verify and compare offers. Other profile values are ignored.

The transport is stateless Streamable HTTP with JSON responses: send POST; GET answers 405 with Allow: POST. A request body can be up to 256 KB.

Set up your client

Use the server URL https://api.headcountlabs.com/mcp in every client and sign in when prompted.

Claude Code

claude mcp add --transport http headcountlabs https://api.headcountlabs.com/mcp
# then run /mcp inside Claude Code and choose Authenticate

Add the server, then sign in from inside Claude Code. Add --scope user to make it available in every project.

Claude on the web and Claude Desktop

  1. Open Settings, then Connectors.
  2. Choose Add custom connector, name it Headcount Labs and paste the server URL.
  3. Choose Connect and sign in.

The same steps work on claude.ai and in Claude Desktop.

ChatGPT

  1. Settings, Apps, Advanced settings: turn on Developer mode.
  2. Create an app with the server URL.
  3. Choose OAuth and sign in.

Step by step.

Cursor

{
  "mcpServers": {
    "headcountlabs": { "url": "https://api.headcountlabs.com/mcp" }
  }
}

Put this in ~/.cursor/mcp.json (or .cursor/mcp.json in one project), then open Cursor Settings, MCP, and sign in to headcountlabs when prompted.

VS Code with GitHub Copilot

  1. Run MCP: Add Server from the command palette.
  2. Choose HTTP and enter the server URL; name it headcountlabs.
  3. Pick the user (global) scope and sign in when prompted.

Or add it by hand to mcp.json: {"servers": {"headcountlabs": {"type": "http", "url": "https://api.headcountlabs.com/mcp"}}}.

Codex

codex mcp add headcountlabs --url https://api.headcountlabs.com/mcp
codex mcp login headcountlabs

Add the server, then sign in. codex mcp list shows whether it is signed in.

Windsurf

{
  "mcpServers": {
    "headcountlabs": { "serverUrl": "https://api.headcountlabs.com/mcp" }
  }
}

Put this in ~/.codeium/windsurf/mcp_config.json, then refresh the MCP list in Windsurf and sign in.

Grok

  1. Go to grok.com/connectors.
  2. Choose New Connector, then Custom.
  3. Paste the server URL and sign in when asked.

Step by step.

Gemini CLI

{
  "mcpServers": {
    "headcountlabs": { "command": "npx", "args": ["mcp-remote", "https://api.headcountlabs.com/mcp"] }
  }
}

Put this in ~/.gemini/settings.json, start Gemini CLI and run /mcp list. The mcp-remote helper opens the browser sign-in.

Any other MCP client

Use the URL https://api.headcountlabs.com/mcp as a remote (Streamable HTTP) server with OAuth. If a client only supports stdio, run npx mcp-remote https://api.headcountlabs.com/mcp. Clients that cannot sign in can use the keyless https://api.headcountlabs.com/mcp/public for read-only job search.

Which tool to call

What a user might say, the call an agent should make, and the rule behind it. Every call below was run against the live MCP server on October 9, 2026: 36 of 36 returned the expected result. Five cases (the next page, job details, raw source data, full descriptions and company details examples) now use limit 10, the smallest page size, and were not run again after that change. The calls that change billing were not run. The tools added since that test run (market_lookup, market_breakdown, salary_range and market_dimensions, which replaced market_insights, plus verify_jobs, compare_sources, get_overage and the search, company, export and usage-report tools) are described in the tool table and were checked against the server code, not run. {{today-7}} means the date seven days ago, and {{prev.job_id}} a value from the previous call's result. The same key is at /docs/mcp-answer-key.json for agents and test harnesses.

User saysCallWhy
“How many jobs do you have?”
count_jobs {}
No filters counts every published job.
“How many nursing jobs are there in California?”
count_jobs {"filters": {"title": "nurse", "state": "CA"}}
state alone means a U.S. state, as a two-letter code.
“How many open jobs does Salesforce have?”
count_jobs {"filters": {"company": "salesforce", "active": true}}
company matches the employer name as text; active=true keeps jobs whose currentness is current.
“Find remote software engineer jobs.”
search_jobs {"filters": {"title_advanced": "\"software engineer\" OR \"software developer\"", "work_arrangement": "remote"}, "limit": 10}
Remote is work_arrangement=remote, not a word search. title_advanced catches the common title variants.
“Show me senior software engineer jobs.”
search_jobs {"filters": {"title_advanced": "senior AND (\"software engineer\" OR \"software developer\")"}, "limit": 10}
title matches the words as one phrase in order, so title="senior software engineer" misses "Software Engineer, Senior". Use title_advanced.
“What jobs is Salesforce hiring for?”
search_jobs {"filters": {"company": "salesforce", "active": true}, "limit": 10}
company is a case-insensitive contains match on the employer name.
“Jobs posted in Texas in the last week.”
search_jobs {"filters": {"state": "TX", "posted_since": "{{today-7}}"}, "limit": 10}
posted_since is the date the source published the job; a plain date works.
“Data analyst jobs paying at least $100k a year.”
search_jobs {"filters": {"title": "data analyst", "pay_min": 100000}, "limit": 10}
pay_min is yearly; hourly pay is converted at 2,080 hours.
“Jobs in Toronto.”
search_jobs {"filters": {"city": "Toronto", "country": "CA"}, "limit": 10}
Add country for a city outside the U.S. CA as a country is Canada.
“Jobs in Ontario, Canada.”
search_jobs {"filters": {"state": "ON", "country": "CA"}, "limit": 10}
A non-U.S. state or province needs country too; state=ON alone would mean a U.S. state.
“Part-time jobs in New York City.”
search_jobs {"filters": {"employment_type": "part_time", "city": "New York", "state": "NY"}, "limit": 10}
employment_type is an exact value such as full_time or part_time.
“Hybrid product manager roles.”
search_jobs {"filters": {"title": "product manager", "work_arrangement": "hybrid"}, "limit": 10}
work_arrangement is remote, hybrid or in_person.
“Jobs that mention Kubernetes.”
search_jobs {"filters": {"description": "kubernetes"}, "limit": 10}
description searches the job text; q searches title or description.
“Jobs that need Python but not Java.”
search_jobs {"filters": {"description_advanced": "python AND NOT java"}, "limit": 10}
description_advanced takes AND, OR, NOT and parentheses.
“Anything about machine learning.”
search_jobs {"filters": {"title": "machine learning"}, "limit": 10}
For job titles use title, which is fast. q searches every word of titles and descriptions, ranked by relevance; it is the slowest filter and can run past the 90-second limit with a narrow filter such as a small country, so use it only when the words must also be in descriptions.
“Only show jobs that are still open.”
search_jobs {"filters": {"title": "accountant", "currentness": "current"}, "limit": 10}
currentness=current (or active=true) keeps jobs the latest read still found.
“Leave out stale jobs.”
search_jobs {"filters": {"title": "accountant", "stale": false}, "limit": 10}
stale=false filters stale jobs out.
“Jobs from Greenhouse boards only.”
search_jobs {"filters": {"source": "greenhouse"}, "limit": 10}
source is the vendor name in lower case.
“Marketing jobs that list a salary.”
search_jobs {"filters": {"title": "marketing", "has_pay": true}, "limit": 10}
has_pay=true keeps jobs with a posting that publishes pay.
“Only jobs where I can still apply.”
search_jobs {"filters": {"title": "nurse", "application_check": "available"}, "limit": 10}
application_check is available, closed, broken or inconclusive; available means an application could still be started.
“How many jobs have a broken application link?”
count_jobs {"filters": {"application_check": "broken"}}
Expect 0. A broken or closed apply check takes that posting out of the current set, so a job with no other current posting is withdrawn and never reaches the public data. A count above 0 would mean withdrawn jobs are leaking into the public set. To find jobs whose apply link is still open, use application_check "available".
“Jobs that were taken down.”
search_jobs {"filters": {"posting_status": "no_longer_listed"}, "limit": 10}
posting_status=no_longer_listed means a complete read of the source no longer found the posting.
“What changed since yesterday?”
search_jobs {"filters": {"updated_since": "{{today-1}}"}, "sort": "updated", "limit": 10}
updated_since with sort=updated is the incremental pull.
“Show me the next page.”
search_jobs {"filters": {"title": "nurse"}, "limit": 10}
search_jobs {"filters": {"title": "nurse"}, "limit": 10, "cursor": "{{prev.cursor}}"}
Repeat the same filters with the cursor from the last result.
“Tell me everything about that job.”
search_jobs {"filters": {"title": "pharmacist"}, "limit": 10}
get_job {"job_id": "{{prev.job_id}}"}
get_job returns one job with every linked posting and the full description.
“Show me the raw source data for that job.”
search_jobs {"filters": {"title": "pharmacist"}, "limit": 10}
get_job {"job_id": "{{prev.job_id}}", "include_source_data": true}
include_source_data adds each posting's source fields.
“Give me the full descriptions, not snippets.”
search_jobs {"filters": {"title": "paralegal"}, "limit": 10, "descriptions": "full"}
Descriptions are cut to 400 characters unless descriptions=full.
“Export the first 200 nurse jobs in Ohio as a file.”
search_jobs {"filters": {"title": "nurse", "state": "OH"}, "deliver_file": true, "max_jobs": 200}
A search returns up to 250 jobs by default, 50 a page; set max_results (up to 1,000) on the first call for more, or use deliver_file with max_jobs for a bigger pull.
“Read the next 25 jobs from that file.”
search_jobs {"filters": {"title": "nurse", "state": "OH"}, "deliver_file": true, "max_jobs": 200}
read_file {"file_id": "{{prev.file_id}}", "offset": 25, "limit": 25}
read_file pages through a delivered file for free for 24 hours.
“How much of my allowance is left?”
get_usage {}
get_usage is free and works even when the allowance is used up.
“How many API requests have I used?”
get_usage {}
The same call reports requests used and remaining.
“What filters are there for pay?”
list_fields {"keywords": ["pay"]}
list_fields is free; pass keywords to narrow it.
“What happens when I use up my free jobs?”
search_docs {"question": "What happens when I use up my free jobs for the day?"}
Questions about pricing, limits and setup go to search_docs, which is free.
“How do I connect Headcount Labs to Claude?”
search_docs {"question": "How do I connect the MCP server to Claude?"}
Setup questions go to search_docs.
“Stop asking me before big searches.”
set_confirmation_level {"percent": 0}
set_confirmation_level {"percent": 25}
Only when the user asks. 0 turns the question off; the runner puts it back to 25.
“Turn on overage.”
set_overage {"enabled": true}
Only when the user asks. It changes billing, so the runner does not call it; an account without paid access gets an upgrade_url.
“Don't let overage cost more than $25 a month.”
set_overage {"monthlyLimitUsd": 25}
monthlyLimitUsd caps overage dollars a month; null clears it, and leaving it out keeps the current limit. Only when the user asks; the runner does not call it.
“Show Salesforce jobs with the company details.”
search_jobs {"filters": {"company": "salesforce", "include": "company"}, "limit": 10}
include=company adds the linked company record to each job.
“What's the average salary for nurses?”
market_lookup {"title": "Registered Nurse", "metric": "pay"}
market_lookup answers pay questions from a daily snapshot of open US jobs and is free. The answer includes its as_of date. Do not average a sample of search results and present it as the market figure. For a live job count, use count_jobs.
“Look up Salesforce's company record.”
search_companies {"name": "salesforce"}
get_company {"company_id": "{{prev.company_id}}"}
Company tools need the companies:read scope, and each company returned is one record. search_jobs with include=company adds the company record to each job without the scope.

Common mistakes

  • Filters go inside filters: {"filters": {"title": "nurse"}}, not {"title": "nurse"}. There is no query filter; the keyword filter is q. list_fields (free) lists every filter name.
  • title matches the words as one phrase in order, so senior software engineer misses “Software Engineer, Senior”. Use title_advanced with AND, OR and NOT.
  • Remote work is work_arrangement: "remote" (or hybrid, in_person), not a word search.
  • state on its own is a U.S. state. For a province or another country's region, add country: {"state": "ON", "country": "CA"}.
  • A search returns up to 250 jobs by default, 50 a page. Set max_results (up to 1,000) on the first call for more. For a bigger pull, use deliver_file: true with max_jobs, then read_file.
  • Size a search with count_jobs first; it uses no jobs.

How jobs are counted

search_jobs and get_job count one record for each job they return, including every job in a delivered file. verify_jobs counts the jobs it samples and compare_sources the jobs it matches. list_companies, search_companies, get_company, list_company_jobs, search_jobs_json, search_jobs_dsl and list_job_changes count one record for each company, job or change event returned, and a completed export counts one record for every job it writes. count_jobs, list_fields, read_file, read_job_export_file, list_job_exports, get_job_export, market_lookup, market_breakdown, salary_range, market_dimensions, search_docs, get_usage, get_overage, get_usage_requests, get_usage_analytics, set_confirmation_level and set_overage cost nothing. The usage object on each search_jobs and get_job result shows jobs_used_this_call and the records you have left. The API and the MCP server share one free monthly allowance and the same prices; see rate limits and free allowance.

Confirmation before large searches

One search is the first search_jobs call plus every call that passes its next_cursor, or one file delivery. When the next page would take that search past your confirmation level, the call returns an error with http_status 409 and code confirmation_required, and uses no jobs. The error carries jobs_returned_so_far, next_page_size, threshold_jobs, level_percent, the monthly or daily limit and jobs_remaining. Your agent should ask you, then repeat the call with confirmed: true. verify_jobs and compare_sources ask the same way. The level belongs to your account, not to one key.

Sign-in and access

MCP clients sign in with OAuth 2.1 in your browser: the client finds the server's metadata at /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server, registers itself at /api/oauth/register (dynamic client registration, public client, PKCE S256, https or loopback redirect addresses, at most 5), sends you to /oauth/authorize and gets tokens from /api/oauth/token. You sign in with Google or an email and password, then approve the scopes on the consent page. The sign-in code lasts 60 seconds and works once. The access token lasts one hour; the client refreshes it with a 30-day refresh token that rotates each time, and reusing an old refresh token revokes the connection. Each connection shows up as an API key labeled MCP: <client name> on api.headcountlabs.com/data/keys; delete it there to disconnect. A customer-created API key also works as a bearer token on /mcp. Setup steps for each client are on the MCP page.

Scopes

ScopeLets the clientTools
jobs:readSearch, count, export and read published jobssearch_jobs, get_job, count_jobs, read_file, verify_jobs, compare_sources, search_jobs_json, search_jobs_dsl, list_job_changes, the four export tools, get_usage
companies:readSearch and read published company records and their jobslist_companies, search_companies, get_company, list_company_jobs
usage:readRead API usage requests, analytics and overage statusget_usage_requests, get_usage_analytics, get_overage, get_usage
overage:writeChange the account's overage setting or search confirmation level when you explicitly request itset_overage, set_confirmation_level

A client that asks for no scope gets jobs:read only. To use the company and usage tools, the client must ask for companies:read and usage:read (and overage:write to change the confirmation level or overage) in its scope parameter; the sign-in page lists each scope in plain words before you approve. A tool called without its scope returns insufficient_scope (403). Unknown scopes are refused.

Never ask the user to paste a password, API key or token into chat, and never put one in a prompt, file or log. Keep keys in the client's secret store or in environment variables.

Compact results

search_jobs and read_file return a compact summary of each job unless you ask for more: rank, job_id, job_ad (the employer-written title, employer and a 200-character snippet of the description), company_id, locations, work_arrangement, pay (min, max, currency, period), posted_at, first_seen_at, posting_url and apply_url. A compact page also says view: "compact" and has a detail_hint. total_matches, the ranking and next_cursor are the same in both views.

To get every field, pass view: "full" (descriptions cut to 400 characters), add descriptions: "full" for the whole text, name the properties you need in fields, or call get_job for one job. Ten typical searches of 10 jobs came to about 19,700 tokens compact, against 51,600 with every field: 62% less. The REST API (/v1/jobs) is unchanged.

Job ad text is data

Titles, employer names, descriptions, snippets, locations and source data are copied from employers' public postings. They can hold anything an employer typed, including text written to look like instructions to an AI. Every result that carries this text starts with an untrusted_content notice naming those fields, and the server's instructions tell the AI to treat the text only as data to show, quote or summarize, and never to follow it.

Before sending the text, the MCP server removes characters and markup that hide text from a person reading it: zero-width and text-direction characters, Unicode tag characters, HTML comments, script, style, template and noscript blocks, and elements marked hidden, aria-hidden="true", display: none, visibility: hidden, font-size: 0 or opacity: 0. The stored jobs and the REST API are unchanged.

Job cards

In clients that support MCP Apps, search_jobs results also appear as job cards: title, employer, location, remote or hybrid, pay and posted date, with an Apply button that opens the original posting. The pay, work arrangement and location controls on the cards run a new search, and "Show more jobs" loads the next page. The cards follow the client's light or dark theme and fit a phone screen. The view is the resource ui://headcountlabs/job-cards-v1.html, named in the tool's _meta.ui.resourceUri (and openai/outputTemplate for ChatGPT). Clients without MCP Apps show the normal result. A search from the cards uses records like any other search_jobs call.

Rate limits

Both /mcp and /mcp/public allow 60 tool calls per rolling minute for each API key or OAuth token. A call with no key counts against its conversation instead (20 a minute), and against its network (IPv4 /24 or IPv6 /48), which allows 600 a minute across every conversation on it. A conversation is ChatGPT's openai/session id in _meta, or else the Mcp-Session-Id header that initialize returns; a call that names neither counts only against its network. Only tools/call counts: initialize, tools/list and notifications do not, and each tools/call inside a JSON-RPC batch counts as one. The limit is shared across all of our servers, so it holds however your calls are routed.

Over the limit, the server answers HTTP 429 with a Retry-After header (seconds to wait) plus RateLimit-Limit, RateLimit-Remaining (0) and RateLimit-Reset headers, and a JSON-RPC error: error.code -32029, a plain error.message, and error.data with code: "rate_limited", http_status: 429, retry_after_seconds, limit (60 for a key, 20 for a conversation, 600 for a network), limit_scope (key, conversation or network) and window_seconds: 60. A refused call is never billed and uses no records. Wait Retry-After seconds, then repeat the same call.

HTTP/1.1 429
Retry-After: 36
{"jsonrpc": "2.0", "id": 21, "error": {"code": -32029,
  "message": "Too many requests: this API key is limited to 60 tool calls per minute. Try again in 36 seconds.",
  "data": {"code": "rate_limited", "http_status": 429, "retry_after_seconds": 36, "limit": 60, "limit_scope": "key", "window_seconds": 60}}}

Calls without an account (/mcp/public with no key) also have daily limits: 1,000 calls a day per conversation and a site-wide daily budget. Those refusals are a tool error with code rate_limited and retry_after_seconds. Signed-in calls also count toward the account's API limits: at most 10 requests running at once per API key (more returns a tool error with http_status 429, rate_limited and limit_scope concurrency), one search_jobs_json or search_jobs_dsl search at a time per key, and on the free allowance 60 requests in any 60 seconds (1 per second) and 1,000 a day, counted across the account's keys. Send calls one after another rather than as a parallel batch; on a 429 wait Retry-After (retry_after) seconds and retry the call once.

Errors

A failed tool call returns isError: true with http_status, request_id and the API's error object; a 429 also carries retry_after. Codes the MCP server adds: confirmation_required (409), file_not_found (404, the file expired or belongs to another account), invalid_request (400, for example a bad filter or cursor), insufficient_scope (403, the token lacks the scope in the Access column), invalid_job_redirect (502), job_redirect_cycle and job_redirect_limit (508, a merged job that loops or has more than 5 hops), invalid_export_file (502), catalog_unavailable and service_unavailable (503). rate_limited (HTTP 429, JSON-RPC error -32029, see Rate limits). On /mcp/public: search_limit_reached. A search_jobs or count_jobs call that runs past the 90-second limit returns http_status 503 with code query_too_broad (alias service_unavailable, retryable false) and uses no jobs. Do not repeat it unchanged: for job titles use filters.title (or title_advanced) instead of filters.q, which searches every word of titles and descriptions and is the slowest filter, and add a state, city, source or company. A 503 that says the service is busy (three long searches already running) can be retried after a minute. All API codes are listed under errors.

Fixing a rejected call

When a call's arguments are wrong, the tool returns http_status 400 with code invalid_arguments and a problems list. Each problem names the field, says what is wrong in problem, and gives an example that works. It adds accepted (the allowed values) when the field takes a fixed list, and did_you_mean for an unknown name, such as filters.q for filters.query. A value the API rejects (invalid_request) also carries field and example. rate_limited (429) and temporary 503 errors (busy, catalog being published, a passing failure) carry retry_after_seconds and say how long to wait before repeating the same call. A search stopped at the time limit, or a query_timeout, does not: it would be stopped again, so the message says to narrow the call instead. A 429 for a used-up allowance or spend limit does not, because waiting a few seconds does not fix it.

{"http_status": 400, "error": {"code": "invalid_arguments", "tool": "search_jobs",
  "message": "query is not a filter. Did you mean filters.q? Fix the call and try again; list_fields shows every filter name.",
  "problems": [{"field": "filters.query", "problem": "query is not a filter. Did you mean filters.q?",
    "did_you_mean": "filters.q", "example": {"filters": {"q": "nurse"}}}]}}

Continue in the reference

Routes, filters and response fields.

API reference Job filters