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
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_idstring· required — The search to stop.
Response
idstring· required — Search id,srch_….objectstring· required — Alwayssearch. One of:search.statusstring· required — Where the search is. One of:queued,running,requires_action,succeeded,failed,cancelled,expired.modestring· required —raworscreened. One of:raw,screened.signal_typestring· required — The signal you asked for. One of:linkedin_engagement,social_listening,funding_raised,new_in_role,events,tech_adoption.progressobject | null—stageandmessagewhile it runs.resultobject | null— Set whenstatusissucceeded. Screened:exact,just_outside,total_estimate,max_leads_applied. Raw:rows,has_more,next_cursor.creditsobject· required —charged,reserved(worst case while open, 0 when finished) andmax_credits.required_actionobject | null— Set onrequires_action:typechoose_event,candidates(up to 5) andexpires_at(24 hours).errorobject | null— Set whenstatusisfailed:type,message,retryable.requestobject· 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
}
}