API reference
Preview a search
The most a search can cost, with the same body as POST /searches. No source call and nothing is charged. Use it before you set max_credits.
POSThttps://mysdr.app/api/v1/searches/preview
Authentication
Send Authorization: Bearer gtk_…. Create the key under Connect assistant → API keys. A missing, invalid or revoked key is 401. A valid key while this API is not enabled for your organization answers 403 api_not_enabled, with what the key can do instead. Every response includes mySDR-Api-Version, mySDR-Request-Id and Cache-Control: no-store, and a response to an accepted key also X-RateLimit-* (so not a 401, a 405, an OPTIONS or a 404 for an unknown path).
Body parameters
signalobject· required — Required.typeislinkedin_engagement(needscompany.linkedin_url),own_engagement(needs your owncompany.linkedin_url,peopleor both),social_listening(needsquery),funding_raised(needscountries),new_in_role(needstitlesandlocations),events(needsevent.name;event_postsis the old name) ortech_adoption(needstechnologies). Every field of each type is on its page under Signals, for example Funding rounds, and in GET /signals/{signal_type}.modestring— Optional, and onlyraw: every search returns the rows of the source, with no AI judging them. Leave it out. One of:raw.exclude_companiesobject[]— Up to 20 LinkedIn company pages whose rows are never delivered. Tech adoption usessignal.exclude_domainsinstead.limitinteger— How many rows. Capped atmax_rowsof the type in GET /signals; defaults to itsdefault_limit.cursorstring | null—result.next_cursorof an earlier search with the same signal: this search continues where that one stopped, without the rows it already delivered. One chain delivers at most 500 rows, kept 30 days.webhook_endpoint_idstring | null— A webhook endpoint id (whe_…) that receives this search’s events.metadataobject— Up to 10 string values. Keys 1–40 characters, values up to 200.max_creditsinteger | null— Stop before the next row would pass this. Below one row the call is402max_credits_exceededand nothing runs.
Response
objectstring· required — Alwayscost_preview. One of:cost_preview.endpointstring· required — Which call this previews. One of:searches,leads,person.enrich,monitors.row_keystring· required — The row type that sets the headline price.credits_per_rowinteger· required — Credits for one row ofrow_key.max_rowsinteger· required — The most rows this call can return.max_creditsinteger· required — The most the call can spend. Amax_creditsyou sent caps it.periodstring· required —callfor one request,dayfor a monitor. One of:call,day.rowsobject[]· required — Every row type the call can deliver:row_key,credits_per_row,max_rows.notesstring[]· required — Plain-language limits of this preview.
Credits
Free.
Errors
- 400
invalid_request— The body would also be rejected by POST /searches. - 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. - 403
api_not_enabled— The key is valid, but the Signals API or the Company API is not enabled for your organization yet. The error says what this key can do. - 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://mysdr.app/api/v1/searches/preview" \
-H "Authorization: Bearer $MYSDR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"signal": {
"type": "funding_raised",
"countries": [
"BE"
],
"window_days": 30
},
"limit": 10
}'
JavaScript
const response = await fetch('https://mysdr.app/api/v1/searches/preview', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MYSDR_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"signal": {
"type": "funding_raised",
"countries": [
"BE"
],
"window_days": 30
},
"limit": 10
})
});
const body = await response.json();
Python
import json
import os
import urllib.request
payload = {
"signal": {
"type": "funding_raised",
"countries": [
"BE"
],
"window_days": 30
},
"limit": 10
}
request = urllib.request.Request(
"https://mysdr.app/api/v1/searches/preview",
headers={
"Authorization": f"Bearer {os.environ['MYSDR_API_KEY']}",
"Content-Type": "application/json"
},
data=json.dumps(payload).encode(),
method="POST",
)
with urllib.request.urlopen(request) as response:
body = json.load(response)
Example response
{
"object": "cost_preview",
"endpoint": "searches",
"row_key": "funding_company",
"credits_per_row": 1,
"max_rows": 10,
"max_credits": 10,
"period": "call",
"rows": [
{
"row_key": "funding_company",
"credits_per_row": 1,
"max_rows": 10
}
],
"notes": []
}