# OpenFunnel > Headless GTM intelligence APIs and agent primitives for finding, qualifying, and > researching companies. Every request authenticates with a single header, > `X-API-Key: `, against base URL `https://api.openfunnel.dev`. > No key yet? Self-serve one in two calls - see Authentication. OpenFunnel exposes its GTM intelligence through **Agent Primitives** - low-level, stateless building blocks that most coding-agent tasks need: find lookalike companies, search companies by their tech stack, qualify a single company, and resolve names/domains to canonical records. For ad-hoc company discovery from code, use Agent Primitives. ## What do you want to do? Match your task to one endpoint before doing anything else. Every task family is listed here - read the row that matches your intent, then jump to that section. **Find / qualify companies (Agent Primitives):** - **Find NEW companies similar to a seed company, or matching a description** → `GET /api/v1/account/search-lookalikes` - synchronous, returns **up to 100** results in one call. Inputs: `seed_domains` (1–10 company websites) and/or a natural-language `query`, plus optional firmographic filters. - **The same search, but you need more than 100 results (up to 10,000)** → `POST /api/v1/account/search-lookalikes-bulk` - asynchronous. Returns a `job_id` immediately; poll `GET /api/v1/account/search-lookalikes-bulk/{job_id}` until `status: completed`, then page results with `next_cursor`. **Do not loop the synchronous endpoint to exceed 100 - that is what bulk is for.** - **Find companies by the technology in their job postings** → `GET /api/v2/tech/companies` (sync). - **Qualify ONE already-known company against criteria** → `POST /api/v2/research/deep`. - **Resolve company names / domains / LinkedIn URLs to canonical records** → `POST /api/v1/account/lookup-companies` - batch up to 100, free. ### Gotchas that cause most agent failures - **`limit` defaults to 10, max 100** on `search-lookalikes`. Always set it explicitly. For >100, switch to `search-lookalikes-bulk` (do not paginate the sync endpoint - it has no offset). - **Async jobs return a `job_id`, not results.** `search-lookalikes-bulk` runs in the background. Poll the job until `status: completed` - a null `next_cursor` on a still-running job does **not** mean it is done; check `status`. - **`locations` are ISO 3166-1 alpha-3 codes** - `USA`, `CAN`, `GBR`, `DEU` - never alpha-2 (`US`, `CA`). Pass the param once per value. Full list via `GET /api/v2/tech/country-options` (List Country Codes). - **Discover valid filter values first** with `GET /api/v1/account/firmographic-options` (returns accepted `funding_stages`, supported `locations`, and employee bounds). - **Auth is `X-API-Key`** (not a Bearer token) on every request. ### Bulk lookalike recipe (the async flow in full) ``` POST /api/v1/account/search-lookalikes-bulk # body: query and/or seed_domains, limit, filters → {job_id} GET /api/v1/account/search-lookalikes-bulk/{job_id} # poll until status == "completed" GET /api/v1/account/search-lookalikes-bulk/{job_id}?cursor=… # page results via next_cursor POST /api/v1/account/search-lookalikes-bulk/{job_id}/cancel # optional: stop early; keep what was delivered ``` ## Agent Primitives - [Agent Primitives overview](https://docs.openfunnel.dev/agent-primitives/introduction.md): What the primitives are and how to compose them into a GTM workflow. - [Search Lookalikes](https://docs.openfunnel.dev/agent-primitives/search-lookalikes.md): Find lookalike companies from seed websites and/or a natural-language description, with optional firmographic filters. **Synchronous, ≤100 results, `limit` default 10.** - [Search Lookalikes Bulk](https://docs.openfunnel.dev/agent-primitives/search-lookalikes-bulk.md): Asynchronous, high-volume variant (up to 10,000). Returns a `job_id` immediately - poll for results. **Use this whenever you need >100.** - [Poll / page bulk lookalike results](https://docs.openfunnel.dev/helpers/search-lookalikes-bulk-results.md): GET the `job_id` from Search Lookalikes Bulk for status and paged results. - [Cancel bulk lookalike job](https://docs.openfunnel.dev/helpers/cancel-bulk-lookalike-job.md): Stop a running/pending bulk job; already-delivered companies stay readable. - [Search Companies by Tech Stack](https://docs.openfunnel.dev/agent-primitives/search-companies-by-tech-stack.md): Companies whose recent job postings mention a given technology. - [Deep Research](https://docs.openfunnel.dev/agent-primitives/deep-research.md): Qualify a single known company against your criteria (activity + org structure). - [Lookup Companies](https://docs.openfunnel.dev/helpers/lookup-companies.md): Resolve up to 100 companies to canonical records by name / domain / linkedin_url. Free. - [List Firmographic Options](https://docs.openfunnel.dev/helpers/list-firmographic-options.md): The accepted firmographic filter values (funding stages, locations, employee bounds). Call once before filtering. - [List Country Codes](https://docs.openfunnel.dev/helpers/list-country-codes.md): The ISO 3166-1 **alpha-3** location codes the search endpoints accept, ordered by company volume. - [Get Credit Balance](https://docs.openfunnel.dev/helpers/get-credit-balance.md): `GET /api/v1/credits/balance` - your account's total allowance, credits consumed, and credits remaining. ## MCP Server - [MCP Server](https://docs.openfunnel.dev/mcp-server.md): Hosted Model Context Protocol server at `https://agents.openfunnel.dev/mcp` that exposes the Agent Primitives as MCP tools. Connect from Claude, Cursor, or any MCP client. Auth is a one-time OAuth sign-in (no `X-API-Key` to manage) - the server resolves your key from your account. Same primitives, same credit costs. ## Authentication - [Authentication](https://docs.openfunnel.dev/index.md): Self-serve an API key in two calls, then send `X-API-Key` on every request. - [Credits](https://docs.openfunnel.dev/agent-primitives/credits.md): Per-endpoint credit costs. ## API specs (typed request/response schemas) - [openapi](https://docs.openfunnel.dev/agent-primitives/openapi.json): One spec covering every Agent Primitive and helper - `search-lookalikes`, `search-lookalikes-bulk` (submit + poll + cancel), tech companies, deep research, lookup-companies, firmographic-options, country-options, and credits balance. Read this for exact request/response shapes.