Skip to main content

POST /v1/searches

Send one JSON object with an Authorization: Bearer <credential> header. The credential is not a field. It goes in the header, on this and on every other call.
202 Accepted:
Those two fields are the entire body. Everything else about the run is read back from GET /v1/searches/{id}, which is described in The run. The 202 means the search was accepted and the money was reserved, not that it succeeded. A q outside 3 to 2000 characters is 422 and reserves nothing; a q that is only whitespace is 400. A balance that cannot cover the $5.00 reservation is 402, and in that one case a terminal run row is still written, so you may see a run with status error that has no events. See Errors.
There is no idempotency key yet. A POST that times out on your side may still have started a run: list your recent runs before sending it again, or you will pay for two searches.

Date ranges

If the query names a date range (“between January and June 2025”, “last 90 days”, “during 2024”), the server converts it to absolute dates. The start is sent to web search as a publish-date floor on discovery and on the filter that checks that event. A closed range also keeps an end date on that filter: the event itself has to fall on or before that day. You do not send dates as separate fields.

GET /v1/searches

Your 50 most recent runs, newest first, as the same objects GET /v1/searches/{id} returns, minus result.
That body is abbreviated: each entry carries every field in The run except result. There are no paging parameters. Fifty is the limit and it is not configurable.

POST /v1/searches/{id}/stop

202 Accepted:
status is the run’s status at the moment the flag was raised, so on a live run it reads running: the stop is a request, not a transition. Keep reading the stream, or poll the run. The run unwinds within seconds and lands as stopped, emitting final (with stopped: true), cost, usage and done for whatever had already passed the funnel. You are charged for what it spent up to that point. Stopping a run that has already finished is also 202, and status then reads the terminal state it reached. Only a run that is not yours, or does not exist, is 404. Calling stop twice is harmless.