How to get ICP-matched companies in an AI SDR agent

Which tool does my agent call to find companies matching an ICP?

Prosp (prosp.cc) gives your agent one discovery entry point: call find_prospects with a natural-language description of your ideal customer profile and optional filters for industries, locations, company sizes, keywords, exclusions, sub-country regions and business models. The call returns a jobId immediately; companies arrive asynchronously.

A search costs 100 credits. Over REST the equivalent is POST /api/v1/discoveries, which accepts the same shape.

Start a discovery (REST, JavaScript)
// accessToken: exchange your Client ID and Secret (/credentials in the bot) for a token with the OAuth client-credentials grant; the token URL is in /docs/
// idempotencyKey: make ONE per run and reuse it when a step is retried, so a retry never starts a second paid job
const res = await fetch("https://api.prosp.cc/api/v1/discoveries", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${accessToken}`,
    "Content-Type": "application/json",
    "X-Idempotency-Key": idempotencyKey,
  },
  body: JSON.stringify({
    "query": "Independent coffee roasters in the Netherlands that supply cafes and restaurants",
    "locations": [
      "Netherlands"
    ],
    "company_sizes": [
      "small",
      "medium"
    ],
    "maxResults": 5
  }),
});
if (!res.ok) throw new Error(`start failed: HTTP ${res.status}`);   // 402 no credits; 409 a warning or the same job already running (nothing charged); 429 too many requests or jobs
const { jobId } = await res.json();
What Prosp answered (HTTP 200)
{
  "jobId": "5fd86ce778c25261e522b4f516ae6c1c",
  "status": "running",
  "createdAt": "2026-11-09T01:26:49.070978327Z",
  "poll_after_seconds": 20,
  "estimated_duration_seconds": 3605,
  "estimated_duration_p50_seconds": 116,
  "estimated_duration_p90_seconds": 2589,
  "estimated_duration_p95_seconds": 3605,
  "estimated_yield": 3
}
Your agentYour agentProsp MCP serverProsp MCP serverfind_prospects(query,filters)jobId, target, runningstatusget_discovery_status(jobId)status: completed, domainsfoundget_discovery_results(jobId)companies with contactsgenerate_message(domain)messageId, composing inbackground
Your agent starts a search, polls until it finishes, reads the companies, then writes an e-mail for one of them.

What does the agent send and what comes back?

Send a description of the companies you want. The recorded request an agent sent was: Independent coffee roasters in the Netherlands that supply cafes and restaurants.

The response below returns a jobId you use to poll, plus the target count and any domains found so far. The companies themselves are not in this first response — you read them after the search finishes.

What Prosp answered (HTTP 200)
{
  "jobId": "5fd86ce778c25261e522b4f516ae6c1c",
  "status": "running",
  "createdAt": "2026-11-09T01:26:49.070978327Z",
  "poll_after_seconds": 20,
  "estimated_duration_seconds": 3605,
  "estimated_duration_p50_seconds": 116,
  "estimated_duration_p90_seconds": 2589,
  "estimated_duration_p95_seconds": 3605,
  "estimated_yield": 3
}

How do I wait for the search to finish?

Poll GET /mcp/jobs/{jobId}/status (REST) or get_discovery_status (MCP) until the status reaches a terminal state: completed, failed or exhausted. A search usually takes minutes; some take up to about an hour.

While the search runs, the status response accumulates found domains, so you can stream partial results without waiting for the full list. If the search fails or you no longer need it, cancel with POST /mcp/jobs/{jobId}/cancel; credits are refunded only when nothing had been delivered at cancel time.

Once the status is completed, move to reading the companies.

Wait for the job (REST, JavaScript)
// accessToken and jobId: from the calls above
const terminal = ["completed", "failed", "exhausted", "cancelled"];
const deadline = Date.now() + 45 * 60 * 1000;
let job, cursor = null, wait = 20;   // seconds; then the poll_after_seconds of the last answer
do {
  await new Promise((r) => setTimeout(r, wait * 1000));
  if (Date.now() > deadline) {
    await fetch(`https://api.prosp.cc/mcp/jobs/${jobId}/cancel`, {
      method: "POST",
      headers: { Authorization: `Bearer ${accessToken}` },
    });   // frees the concurrency slot; prospects already delivered are kept
    throw new Error("the job did not finish in 45 minutes and was cancelled");
  }
  const url = `https://api.prosp.cc/mcp/jobs/${jobId}/status` + (cursor ? `?cursor=${encodeURIComponent(cursor)}` : "");
  const r = await fetch(url, {
    headers: { Authorization: `Bearer ${accessToken}` },
  });
  if (!r.ok) throw new Error(`status check failed: HTTP ${r.status}`);
  job = await r.json();
  cursor = job.next_cursor ?? cursor;   // only the prospects added since the last poll
  wait = job.poll_after_seconds ?? 20;
} while (!terminal.includes(job.status));

What do I do with the companies once the search is done?

Read the finished companies with GET /api/v1/discoveries/{jobId}/prospects (REST) or get_discovery_results (MCP). Each company carries the contacts Prosp found on its web pages — where an e-mail was inferred rather than found, it is marked as inferred.

From here your agent has three next moves, all on Prosp:

Read the companies (REST, JavaScript)
// accessToken and jobId: from the calls above
const r = await fetch(`https://api.prosp.cc/api/v1/discoveries/${jobId}/prospects`, {
  headers: { Authorization: `Bearer ${accessToken}` },
});
const { prospects } = await r.json();
The companies Prosp returned (two shown; contacts are left out of this public example)
{
  "already_owned_count": 1,
  "candidates_screened": 39,
  "prospects": [
    {
      "country_code": "NL",
      "city": "Winterswijk",
      "state": "Gelderland",
      "linkedin_url": "https://www.linkedin.com/company/hesselink-koffie/",
      "instagram_url": "https://www.instagram.com/hesselinkkoffiebranders/",
      "facebook_url": "https://www.facebook.com/hesselinkKoffie",
      "youtube_url": "https://youtube.com/@HesselinkKoffie",
      "business_model": "manufacturer",
      "estimated_annual_revenue_usd": 24000000,
      "domain": "hesselinkkoffie.nl",
      "industry": "Agriculture & Food Production",
      "estimated_revenue_currency": "USD",
      "founded_year": 1885,
      "hq_address": "Winterswijk, Gelderland, Netherlands",
      "social_description": "Hesselink Koffiebranders ( B Corp) \nis een familiebedrijf dat sinds 1885 staat voor topkwaliteit en duurzaamheid in koffie. Met meer dan 140 jaar ervaring beheersen we het ambacht van koffiebranden als geen ander. Onze passie voor perfectie zorgt ervoor dat elke kop koffie een moment van geluk is.",
      "social_follower_count": 2691,
      "social_legal_name": "Hesselink Koffie",
      "social_source": "linkedin",
      "social_extra_links": [
        "http://www.hesselinkkoffie.eu",
        "https://plus.google.com/113443696654761814245/posts",
        "https://www.facebook.com/hesselinkKoffie?fref=ts",
        "https://twitter.com/HesselinkKoffie",
        "http://www.linkedin.com/company/1043333?trk=tyah&trkInfo=tas%3Ahesselink%20koffie%2Cidx%3A1-1-1",
        "http://www.fingerprinted.eu",
        "http://www.hespresso.eu"
      ],
      "social_profiles": [
        {
          "platform": "linkedin",
          "url": "https://www.linkedin.com/company/hesselink-koffie/",
          "follower_count": 2691,
          "legal_name": "Hesselink Koffie"
        },
        {
          "platform": "youtube",
          "url": "https://youtube.com/@HesselinkKoffie",
          "follower_count": 78,
          "extra_links": [
            "http://www.hesselinkkoffie.eu",
            "https://plus.google.com/113443696654761814245/posts",
            "https://www.facebook.com/hesselinkKoffie?fref=ts",
            "https://twitter.com/HesselinkKoffie",
            "http://www.linkedin.com/company/1043333?trk=tyah&trkInfo=tas%3Ahesselink%20koffie%2Cidx%3A1-1-1",
            "http://www.fingerprinted.eu",
            "http://www.hespresso.eu"
          ],
          "legal_name": "Hesselink Koffie",
          "description": "Wij zijn Hesselink Koffie en wij geloven dat lekkere koffie een leven kan verrijken. Voor de meeste Nederlanders is koffie een primaire levensbehoefte. Onze missie is iedereen met die behoefte van dienst te zijn. Dit doen wij vanuit onze eigen koffiebranderij in Winterswijk, zo kunnen wij ambachtelijke en bovenal lekkere koffie garanderen.\n\nWij leveren koffie aan: horeca, bedrijven en particulieren (Hespresso). Daarnaast hebben wij ook ons eigen label duurzame koffie: Fingerprinted Koffie."
        }
      ],
      "discovered_at": "2026-11-04T11:56:49.888716Z",
      "detected_language": "nl",
      "has_wikipedia_article": true,
      "detected_industry": "Agriculture & Food Production",
      "origin_country": "NL",
      "facts": [
        {
          "source": "web",
          "source_url": "https://hesselinkkoffie.nl/over-ons/duurzaamheid/",
          "extracted_at": "2026-11-04T12:03:30.815668Z",
          "text": "Hesselink Koffiebranders maintains transparency throughout their supply chain and holds multiple certifications including Fairtrade Organic, SKAL for organic production, and the Rainforest Alliance seal.",
          "first_party": true
        },
        {
          "source": "web",
          "source_url": "https://hesselinkkoffie.nl/over-ons/duurzaamheid/",
          "extracted_at": "2026-11-04T12:03:30.531299Z",
          "text": "Hesselink Koffiebranders is an officially B Corp certified coffee supplier that provides sustainable coffee solutions to the hospitality industry and other business sectors.",
          "first_party": true
        }
      ],
      "name": "Hesselink Koffie",
      "description": "Hesselink Koffie is a coffee roastery providing artisanal, sustainably sourced coffee beans and professional coffee machines. They serve hospitality and corporate clients primarily across the Netherlands and Germany.",
      "employee_count": 40,
      "company_size": "small",
      "employee_count_source": "unverified_estimate",
      "employee_count_as_of": "2026-11-04T11:56:49.888716Z",
      "size_certainty": "estimated",
      "headquarters_location": "Winterswijk, Netherlands",
      "country": "Netherlands"
    },
    {
      "country_code": "NL",
      "city": "Noordwijkerhout",
      "state": "Zuid-Holland",
      "postal_code": "2211",
      "street": "Pletterij 7",
      "instagram_url": "https://www.instagram.com/koffie_lovers/",
      "facebook_url": "https://www.facebook.com/KoffieLoverss",
      "business_model": "manufacturer",
      "estimated_annual_revenue_usd": 4400000,
      "domain": "koffie-lovers.nl",
      "industry": "Hospitality & Restaurant",
      "estimated_revenue_currency": "USD",
      "founded_year": 1998,
      "hq_address": "Pletterij 7, Noordwijkerhout, Zuid-Holland 2211, Netherlands",
      "discovered_at": "2026-11-04T11:55:22.190906Z",
      "detected_language": "nl",
      "has_wikipedia_article": false,
      "domain_age_days": 4963,
      "detected_industry": "Hospitality & Restaurant",
      "sub_country_region": "NL-ZH",
      "origin_country": "NL",
      "facts": [
        {
          "source": "web",
          "source_url": "https://grachtenbeans.nl/en/koffiebrander/koffie-lovers/",
          "extracted_at": "2026-11-04T11:59:04.202460Z",
          "text": "Koffie Lovers has built a strong brand by combining craft roasting techniques, ethical sourcing, and educational efforts despite having fewer than ten employees.",
          "first_party": false
        },
        {
          "source": "web",
          "source_url": "https://grachtenbeans.nl/en/koffiebrander/koffie-lovers/",
          "extracted_at": "2026-11-04T11:57:39.551192Z",
          "text": "The company offers a range of seven house blends and several single-origin coffees sourced directly from twelve countries, all carrying Fairtrade or Rainforest Alliance certifications.",
          "first_party": false
        }
      ],
      "name": "Koffie Lovers",
      "description": "Koffie Lovers is a coffee roasting business that supplies freshly roasted coffee beans, espresso machines, and accessories to hospitality businesses and offices throughout the Netherlands.",
      "employee_count": 15,
      "company_size": "small",
      "employee_count_source": "unverified_estimate",
      "employee_count_as_of": "2026-11-04T11:55:22.190906Z",
      "size_certainty": "estimated",
      "headquarters_location": "Noordwijkerhout, Netherlands",
      "country": "Netherlands"
    }
  ],
  "evaluated_count": 7,
  "total": 5
}

REST versus MCP: which path should my agent use?

MCP is the simpler connection for an agent: sign in through the MCP window (Continue with Telegram or an e-mailed one-time code — no API key to paste), then call the tools directly. The MCP Server URL is https://api.prosp.cc/mcp-rpc over Streamable HTTP.

REST has two path families. /api/v1/... is the recommended flow (start, poll, read, acknowledge). /mcp/... is a fully supported alternative that adds cancel, CSV export, report download and a merged result endpoint. REST needs an OAuth 2.0 client-credentials token sent as Authorization: Bearer; the Client ID and Client Secret come from the Telegram bot (send /credentials to it), and the token is obtained by POSTing them to https://prosp-mcp-641053169627.auth.eu-central-1.amazoncognito.com/oauth2/token with the scope mcp/execute.

Connect your agent

Press the button below to open the MCP sign-in window and connect your agent. Once connected, your agent calls find_prospects, gets companies matching your ICP back, and can immediately write a first outreach e-mail with generate_message.

Questions

Can I reuse the same criteria for repeated searches?

Yes. Save your criteria once with save_icp (free), then start a new search from that saved profile with run_icp (100 credits) whenever you need a fresh batch.

What happens if the search returns no companies?

The status moves to exhausted. A failed search returns its credits; a completed search that returned fewer results than the target does not.

Connect your agent