Skip to main content

Get a search

GET 

/search/:searchId

Get a search by its ID. The response includes the status and the results of the search.

The queries field is null until the search is complete: when its status field is success, no_results, or error. Then the queries field contains one query for each unique term. Each query has the status and the results of its term.

The results_format query parameter sets how the API returns the results: tree (default) puts child results inside their parent result, and flat returns all results in one list.

You can get only searches in your search history. For a search that isn't in your search history, the API returns 404 Not Found.

Request​

Responses​

The search, with its status, the fields that you sent, and its results. The queries field is null until the search is complete. When the status field is success, no_results, or error, the queries field has one query for each unique term. Each query has the status and the results of its term.

Response Headers
    X-AlsoAsked-Credits

    The number of credits that remain in your account. On the live API, the value is your plan credits plus your pay-as-you-go credits. On the sandbox API, the value is your sandbox credits.

    Example: 100
    X-RateLimit-Limit

    The maximum number of requests that you can send in the window of the rate limit.

    Example: 200
    X-RateLimit-Remaining

    The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.

    Example: 184
    X-RateLimit-Reset

    The current time plus the length of the rate limit window, in Unix time (seconds since 1970-01-01T00:00:00+00:00). A request that you send now stops counting at this time. To know when you can send again after a 429 response, use the Retry-After header.

    Example: 1672531200