Endpoints
    POST/desearch/companies/search

    Company Search

    Find companies from a description and collect each one's public contact data. Describe the companies you want in plain language; the search looks for their websites, reads each homepage and scores how well the company fits, then reads its contact, about, team and imprint pages for emails, phones and social profiles, finds its leaders (`roles`: CEO, founders, CTO and CFO by default) with their LinkedIn profiles, infers their emails from the company's address pattern and checks every email. You get **companies, not pages**: each with a fit score, its contacts and its leaders, and every contact keeps the page it came from (`source_url`). **How it runs.** The task runs in the background. This call returns a `task_id` at once. Poll `GET /desearch/companies/tasks/{task_id}` every few seconds, read companies with `GET /desearch/companies/tasks/{task_id}/results`, or download everything with `GET /desearch/companies/tasks/{task_id}/export?format=csv`. Each company goes through stages: its homepage, its contact, about, team and imprint pages, its leaders, their inferred emails, then a check of every email. A company is published as soon as the stages your request needs have run (its homepage; with `filters.require`, the stage that can show what you require), with `enrichment.status` `partial`; the later stages fill it in while you read, and it is `complete` once every stage has run. Keep `next_cursor` to get only new companies, and read again without it to get the latest version of the ones you have. You can pause, resume or cancel a task at any time. Results stay available for 30 days. When it ends, `completion_reason` says why and `coverage_limited` whether a budget stopped it before it delivered `count` companies. **Billing.** `count` companies are reserved at the route price when the task is created (`cost_usd` on this response). When the task ends you pay only for the companies it delivered, with a minimum of 2 when it delivers any (prices at https://desearch.ai/pricing); the rest of the reservation is returned automatically. A company left out by `min_score` or `filters.require` is not billed, and a task that delivers no companies costs nothing. Prices: https://desearch.ai/pricing. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. Current prices are at https://desearch.ai/pricing. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Company Search when your application needs companies with their public emails, phones, social profiles, and leaderswithout maintaining its own crawler, social-data pipeline, or retrieval infrastructure. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to POST /desearch/companies/search with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Header Parameters

    Idempotency-Keystringoptional

    Optional. Any unique string, for example a UUID. Surrounding whitespace is removed and the value is cut to 200 characters; a longer key is not rejected. The same key again for this company returns the original task with HTTP 200 and refunds this call's reservation, so it is not charged. A new key starts a new task and returns HTTP 202.

    maxLength: 200

    Body Parameters

    querystringrequired

    The companies you are looking for, in plain language: what they do, where, how far along.

    countinteger

    How many companies to deliver. The task reserves this many at the route price and bills only the companies it delivers (a minimum applies when it delivers any; a task that delivers none is free).

    Default: 25

    min_scorestring

    Only deliver companies with at least this fit score (0-100).

    excludearray of strings

    Companies to leave out, as domains or URLs, for example ones you already contacted. Each is reduced to its host without `www.`. Up to 1,000.

    One item per line, or a JSON array. Sent as an array.

    rolesarray

    The leaders to look for: any of `ceo`, `founder`, `cto`, `cfo`, `coo`, `cmo`, `president`, `owner`, `managing_director`. A managing director (Geschäftsführer) counts as `ceo` when `ceo` is asked for.

    Default: ceo,founder,cto,cfo

    infer_emailsboolean

    Guess leaders' emails from the company's address pattern (for example `first.last`), learned from the addresses found on its site. Inferred emails say `source: inferred` and a `confidence`.

    Default: true

    verify_emailsboolean

    Check every email: syntax, mail server (MX) and, for inferred ones, a web search. Each email then has a `verification`. Turn off to finish sooner without it.

    Default: true

    filtersobject (JSON)

    A JSON object, sent as JSON. Leave it empty to omit the field. Keys: countries, require.

    metadataobject (JSON)

    Your own labels for this task, e.g. the workspace or campaign it belongs to. At most 10 keys; keys are 1-40 characters of a-z, 0-9, '_', '.' or '-'; values are strings of at most 200 characters. Returned as `metadata` on the task and usable as a filter on `GET /desearch/companies/tasks` (`metadata.<key>=<value>`). Never used by the task itself.

    A JSON object, sent as JSON. Leave it empty to omit the field.

    Responses

    200Same Idempotency-Key as an earlier task: that task, not charged again.
    202The created task.
    400Bad request: an unknown type, status or cursor, or an invalid `metadata.<key>` filter
    401Unauthorized
    402Not enough credits for the reservation.
    422Validation Error
    429Too many People Search and Company Search tasks are already queued, running or paused.
    500Internal Server Error
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X POST "https://api.desearch.ai/desearch/companies/search" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "count": 25,
      "exclude": [
        "stripe.com"
      ],
      "filters": {
        "countries": [
          "DE"
        ],
        "require": [
          "email"
        ]
      },
      "metadata": {
        "campaign": "q4"
      },
      "min_score": 60,
      "query": "Series A fintech startups in Berlin building payment infrastructure",
      "roles": [
        "ceo",
        "founder",
        "cto",
        "cfo"
      ]
    }'
    ResponseSchema
    {
      "task_id": "Task Id",
      "search_type": "company_search",
      "platform": "company",
      "status": "queued",
      "stage": "planning",
      "query": "Query",
      "count": 0,
      "result_count": 0,
      "request": {},
      "metadata": {},
      "interpreted": {},
      "progress": {},
      "errors": [],
      "completion_reason": "count_reached",
      "coverage_limited": false,
      "warnings": [
        {
          "code": "Code",
          "message": "string"
        }
      ],
      "reserved_cost_usd": 0,
      "final_cost_usd": 0,
      "refunded_usd": 0,
      "created_by": {
        "user_id": "string",
        "api_key_id": "string",
        "via": "string"
      },
      "created_at": "2024-01-15T10:30:00Z",
      "started_at": "2024-01-15T10:30:00Z",
      "paused_at": "2024-01-15T10:30:00Z",
      "finished_at": "2024-01-15T10:30:00Z",
      "results_expire_at": "2024-01-15T10:30:00Z",
      "links": {
        "self": "Self",
        "results": "Results",
        "export": "Export"
      }
    }

    Possible status codes:

    200401422429500