curl --request GET \
--url https://api.getanyapi.com/v1/requests/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getanyapi.com/v1/requests/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getanyapi.com/v1/requests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getanyapi.com/v1/requests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getanyapi.com/v1/requests/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getanyapi.com/v1/requests/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getanyapi.com/v1/requests/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": "<string>",
"status": "queued",
"completedAt": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>"
},
"expiresAt": "2023-11-07T05:31:56Z",
"result": {
"costUsd": 123,
"items": 123,
"output": "<unknown>",
"provider": "<string>",
"replayed": true,
"jqError": "<string>",
"resultId": "<string>",
"source": {
"artworkKey": "<string>",
"id": "<string>",
"kind": "anonymous",
"name": "<string>"
}
},
"resultExpired": true,
"retryAfterSeconds": 2,
"serviceOutcome": "served",
"settlementState": "not_required"
}{
"error": "<string>",
"code": "<string>",
"payment": {
"costUsd": 1,
"rail": "<string>",
"settlementState": "charged_undelivered"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"payment": {
"costUsd": 1,
"rail": "<string>",
"settlementState": "charged_undelivered"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"payment": {
"costUsd": 1,
"rail": "<string>",
"settlementState": "charged_undelivered"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Get a request
Inspect a customer-owned Request. Poll queued or running requests after retryAfterSeconds; a durable result stays collectable for 24 hours. A paid request’s output can be read back for the account’s response retention window, 3 days unless 7 days or none is chosen in the dashboard; lowering the setting hides older output at once. Reading kept output is limited per account to 30 reads a minute for each dollar of lifetime settled spend, so an account that has spent nothing cannot read it. Metadata remains after the result expires (resultExpired).
curl --request GET \
--url https://api.getanyapi.com/v1/requests/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getanyapi.com/v1/requests/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getanyapi.com/v1/requests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getanyapi.com/v1/requests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getanyapi.com/v1/requests/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getanyapi.com/v1/requests/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getanyapi.com/v1/requests/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": "<string>",
"status": "queued",
"completedAt": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>"
},
"expiresAt": "2023-11-07T05:31:56Z",
"result": {
"costUsd": 123,
"items": 123,
"output": "<unknown>",
"provider": "<string>",
"replayed": true,
"jqError": "<string>",
"resultId": "<string>",
"source": {
"artworkKey": "<string>",
"id": "<string>",
"kind": "anonymous",
"name": "<string>"
}
},
"resultExpired": true,
"retryAfterSeconds": 2,
"serviceOutcome": "served",
"settlementState": "not_required"
}{
"error": "<string>",
"code": "<string>",
"payment": {
"costUsd": 1,
"rail": "<string>",
"settlementState": "charged_undelivered"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"payment": {
"costUsd": 1,
"rail": "<string>",
"settlementState": "charged_undelivered"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"payment": {
"costUsd": 1,
"rail": "<string>",
"settlementState": "charged_undelivered"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Your AnyAPI key as a Bearer token.
Path Parameters
Response
Current request snapshot.
queued, running, succeeded, failed, expired Hide child attributes
Hide child attributes
USD charged on the ORIGINAL run, echoed for envelope parity; this re-read is free.
Number of result rows returned by the original run; an API that returns one record counts it as one row.
The normalized result ({found, data} by default, plus reason when found is false), re-shaped by any fields/max_items/summary/jq params. Open shape - a jq expression may replace it with an array or scalar.
Always "AnyAPI".
False on this cached-result endpoint; true is reserved for durable idempotency replays from POST /v1/run/{sku}.
Present only when a jq expression failed; output then carries the full unshaped result and this explains why the reshape did not apply.
The id you requested, echoed so you can keep re-reading the same cached result.
The source that served this run. Pass its id back as source to prefer it again, or as ignoreSources to avoid it. Absent when no source identity applies to the run.
Hide child attributes
Hide child attributes
Key for this source's artwork.
Stable identifier for this source.
anonymous is a stable identity for an unattributed source; brand names the dataset that supplies the data.
anonymous, brand Display name for this source.
x >= 1End-to-end AnyAPI service result when known; independent of payment settlement.
served, valid_negative, caller_error, service_failure, rejected Payment settlement state when known; independent of request lifecycle status.
not_required, pending, settled, reconcile, charged_undelivered, writeoff