API reference
Start a search
Starts a search and answers at once with its
search_id. One credit is reserved.POST
https://dev.predictasearch.com/api/v2/searchHeaders
x-api-keystringrequired
Your API key.
Content-Typestringrequired
application/jsonBody
The same body as v1's POST /api/search. Any other field is refused with a 422.
querystringrequired
What to search for. It must match the format of
query_type, below.query_typeenum<string>required
One of
email, phone, name, username.networksstring[]required
Network names, such as
["github", "chess"], or ["all"] for every network that supports query_type. The list of networks is at GET /api/networks. Networks reserved to the Pro plan are skipped on other plans.Query formats
query_type | Accepted | Example |
|---|---|---|
email | A syntactically valid email address | [email protected] |
phone | International format: + then 7 to 16 digits. Spaces, hyphens and parentheses are removed | +33612345678 |
name | At least two words of letters (any alphabet), -, ' and . | Jean-Pierre Dupont |
username | One word with at least one letter, not an email. A leading @ is removed | johndoe |
Response
202 the search has started, or 200 the same search is already running: read the stream of the search_id returned, no credit is used.
search_idstring
Identifier of the search, to open its stream.
statusstring
runningtotalinteger
Number of sources that will be queried.
networks_rejectedobject[]
Networks you named that will not be queried, each with platform and the reason in error: unknown, not available through the API, or not supporting this query_type.
Always empty with ["all"].
Errors are listed in Errors. A request answered with an error never uses a credit.