FounderMCPDocs

API reference

Cancel a search

Stops a search that is still `queued`, `running` or `requires_action`. Nothing is charged.

POSThttps://foundermcp.dev/api/v1/searches/{search_id}/cancel
View Markdown

Stops a search that is still queued, running or requires_action. Nothing is charged.

Authentication

Send Authorization: Bearer gtk_…. Create the key under API Access → API Keys. A missing, invalid or revoked key is 401, including while this API is closed. A valid key while the API is closed for your organization answers 404, the same body as an unknown path. Every response includes FounderMCP-Api-Version and FounderMCP-Request-Id.

Path parameters

  • search_id string · required — The search to stop.

Response

  • id string · required — Search id, srch_….
  • object string · required — Always search. One of: search.
  • status string · required — Where the search is. One of: queued, running, requires_action, succeeded, failed, cancelled, expired.
  • mode string · required — raw or screened. One of: raw, screened.
  • signal_type string · required — The signal you asked for. One of: linkedin_engagement, social_listening, funding_raised, new_in_role, events, tech_adoption.
  • progress object | null — stage and message while it runs.
  • result object | null — Set when status is succeeded. Screened: exact, just_outside, total_estimate, max_leads_applied. Raw: rows, has_more, next_cursor.
  • credits object · required — charged, reserved (worst case while open, 0 when finished) and max_credits.
  • required_action object | null — Set on requires_action: type choose_event, candidates (up to 5) and expires_at (24 hours).
  • error object | null — Set when status is failed: type, message, retryable.
  • request object · required — The body as validated, with defaults filled in.

Credits

Free. A cancelled search is not charged.

Errors

  • 409 invalid_state — The search already finished. The error includes its status.
  • 401 authentication_error — The Authorization header is missing, or the key is unknown or revoked.
  • 403 permission_error — API access is not part of your plan, or your account is suspended.
  • 404 not_found — The endpoint does not exist.
  • 429 rate_limit_error — More than 60 requests per minute, or more than 3 at the same time, on one key. Wait for the Retry-After header.
  • 500 internal_error — Something went wrong on our side.

Example

cURL

curl -X POST "https://foundermcp.dev/api/v1/searches/srch_01J9Z6P8C8V0K3W6T2N8R5M1XA/cancel" \
  -H "Authorization: Bearer $FOUNDERMCP_API_KEY"

JavaScript

const response = await fetch('https://foundermcp.dev/api/v1/searches/srch_01J9Z6P8C8V0K3W6T2N8R5M1XA/cancel', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.FOUNDERMCP_API_KEY}`
  }
});
const body = await response.json();

Python

import json
import os
import urllib.request

request = urllib.request.Request(
    "https://foundermcp.dev/api/v1/searches/srch_01J9Z6P8C8V0K3W6T2N8R5M1XA/cancel",
    headers={
    "Authorization": f"Bearer {os.environ['FOUNDERMCP_API_KEY']}"
    },
    method="POST",
)
with urllib.request.urlopen(request) as response:
    body = json.load(response)

Example response

{
  "id": "srch_01J9Z6P8C8V0K3W6T2N8R5M1XA",
  "object": "search",
  "status": "cancelled",
  "credits": {
    "charged": 0,
    "reserved": 0,
    "max_credits": null
  }
}