读取亚马逊研究结果
curl --request GET \
--url https://api.glasser.ai/v1/solutions/gtm/amazon_research/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.glasser.ai/v1/solutions/gtm/amazon_research/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.glasser.ai/v1/solutions/gtm/amazon_research/result', 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.glasser.ai/v1/solutions/gtm/amazon_research/result",
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.glasser.ai/v1/solutions/gtm/amazon_research/result"
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.glasser.ai/v1/solutions/gtm/amazon_research/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glasser.ai/v1/solutions/gtm/amazon_research/result")
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{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {},
"output": {
"items": [
{
"asin": "<string>",
"title": "<string>",
"url": "<string>",
"brand": "<string>",
"image_url": "<string>",
"price": 123,
"price_text": "<string>",
"currency": "<string>",
"rating": 123,
"reviews": 123,
"position": 123,
"sponsored": true,
"bought_past_month_text": "<string>",
"stock_text": "<string>",
"condition_text": "<string>",
"price_basis": "displayed_listing_price",
"variants": [
{
"asin": "<string>",
"label": "<string>",
"selected": true
}
],
"attributes": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"amazon_domain": "<string>",
"total_matches": 123,
"next_page": 123
},
"provider_response": {
"http_status": 349,
"error": null
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"action": "search",
"result_status": "success",
"error": {
"code": "<string>",
"message": "<string>"
},
"runs": [
{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {
"omitted": true
},
"output": {
"omitted": true
},
"provider_response": {
"http_status": 349
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
}
}
],
"result_url": "<string>",
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
},
"review_invitation": {
"run_id": "<string>",
"ratings": [
"exceeds_expectations"
],
"instruction": "<string>"
},
"request_charge": {
"charge_usd": "<string>",
"created_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"replayed_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"unknown_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}{
"error": {
"code": "validation_failed",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "forbidden",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "not_found",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}Solutions
读取亚马逊研究结果
读取同一批亚马逊研究 Run 的归一输出、交付状态与总费用。
GET
/
v1
/
solutions
/
gtm
/
amazon_research
/
result
读取亚马逊研究结果
curl --request GET \
--url https://api.glasser.ai/v1/solutions/gtm/amazon_research/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.glasser.ai/v1/solutions/gtm/amazon_research/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.glasser.ai/v1/solutions/gtm/amazon_research/result', 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.glasser.ai/v1/solutions/gtm/amazon_research/result",
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.glasser.ai/v1/solutions/gtm/amazon_research/result"
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.glasser.ai/v1/solutions/gtm/amazon_research/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glasser.ai/v1/solutions/gtm/amazon_research/result")
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{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {},
"output": {
"items": [
{
"asin": "<string>",
"title": "<string>",
"url": "<string>",
"brand": "<string>",
"image_url": "<string>",
"price": 123,
"price_text": "<string>",
"currency": "<string>",
"rating": 123,
"reviews": 123,
"position": 123,
"sponsored": true,
"bought_past_month_text": "<string>",
"stock_text": "<string>",
"condition_text": "<string>",
"price_basis": "displayed_listing_price",
"variants": [
{
"asin": "<string>",
"label": "<string>",
"selected": true
}
],
"attributes": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"amazon_domain": "<string>",
"total_matches": 123,
"next_page": 123
},
"provider_response": {
"http_status": 349,
"error": null
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"action": "search",
"result_status": "success",
"error": {
"code": "<string>",
"message": "<string>"
},
"runs": [
{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {
"omitted": true
},
"output": {
"omitted": true
},
"provider_response": {
"http_status": 349
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
}
}
],
"result_url": "<string>",
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
},
"review_invitation": {
"run_id": "<string>",
"ratings": [
"exceeds_expectations"
],
"instruction": "<string>"
},
"request_charge": {
"charge_usd": "<string>",
"created_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"replayed_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"unknown_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}{
"error": {
"code": "validation_failed",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "forbidden",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "not_found",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}使用原始 result_url 并携带认证。读取不创建 Run、不调用 Provider、不恢复兜底。HTTP 200 仍可能返回 result_status=pending。签名上下文绑定 Workspace,每条 Run 都按当前 Key policy 检查。
查询参数
响应
亚马逊研究结果
以 JSON 文件完整交付较大的 Provider 正文。Glasser 对接收的正文和序列化文件应用 32 MiB 的运行时资源保护。body_field 指明被替代的字段;output 为 null,或省略 provider_response.error。下载链接最多一小时后过期。在文件的 7 天可用期内,通过已认证的 Get Run 刷新链接。读取和下载不会再次执行 Run 或重复收费。state 为 link_pending 时,读取同一 Run 即可准备链接,不会再次执行或重复收费。链接授予临时读取权限,请仅与预期接收者分享。
Show child attributes
Show child attributes