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
- 200
- 401
- 402
- 403
- 404
- 422
- 429
- 500
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
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.
100The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200The request can't use the API. The error type is missing_api_key when the request doesn't have the X-Api-Key
header, or api_access_disabled when the API key is valid but AlsoAsked turned off API access for your account.
Response Headers
The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200The live API needs a Pro plan, and your account doesn't have a Pro plan. The error type is insufficient_plan.
Change your plan to Pro, or use the sandbox API, which doesn't need a Pro plan.
Response Headers
The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200AlsoAsked doesn't accept the API key in the X-Api-Key header. The error type is invalid_api_key.
Response Headers
The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200The search doesn't exist, or the search isn't in your search history, for example because the search belongs to
another account. The error type is not_found.
Response Headers
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.
100The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200A field, a parameter, or a header of the request isn't valid. The error type is validation. The errors field of
the body names the field, parameter, or header.
Response Headers
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.
100The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200You sent more requests than the rate limit allows. The error type is rate_limit_exceeded. Wait until the time
in the Retry-After header, then send the request again. To find your rate limit, read the X-RateLimit-Limit
header, not the message field of the body.
Response Headers
The time when you can send requests again, as an HTTP date in the RFC 1123 format.
Thu, 11 May 2023 07:28:00 GMTThe maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200An error happened in AlsoAsked. The error type is internal_server. If the POST /v1.1/search endpoint returns
this error, AlsoAsked refunds the credits of every term that isn't complete, so you can send the request again. If
AlsoAsked already recorded the search, those terms get the status error. If the check of the rate limit itself
fails, the response has no rate limit headers and no X-AlsoAsked-Credits header.
Response Headers
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.
100The maximum number of requests that you can send in the window of the rate limit.
200The number of requests that you can still send now: the lower of the remaining requests for your API key and for your IP address.
184The 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.
1672531200