curl --request GET \
--url https://api.glasser.ai/v1/solutions/gtm/web_research/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.glasser.ai/v1/solutions/gtm/web_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/web_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/web_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/web_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/web_research/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glasser.ai/v1/solutions/gtm/web_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": {
"url": "<string>",
"final_url": "<string>",
"title": "<string>",
"text": "<string>",
"markdown": "<string>",
"html": "<string>",
"raw_html": "<string>",
"text_character_limit": 123,
"cached": true,
"fetched_at": "<string>",
"quality": "unverified"
},
"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",
"missing_formats": [
"text"
],
"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": {}
}
],
"result_url": "<string>"
}{
"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。
curl --request GET \
--url https://api.glasser.ai/v1/solutions/gtm/web_research/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.glasser.ai/v1/solutions/gtm/web_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/web_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/web_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/web_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/web_research/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glasser.ai/v1/solutions/gtm/web_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": {
"url": "<string>",
"final_url": "<string>",
"title": "<string>",
"text": "<string>",
"markdown": "<string>",
"html": "<string>",
"raw_html": "<string>",
"text_character_limit": 123,
"cached": true,
"fetched_at": "<string>",
"quality": "unverified"
},
"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",
"missing_formats": [
"text"
],
"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": {}
}
],
"result_url": "<string>"
}{
"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 的 API Key 认证。
1 - 16384响应
WebResearchResult
在控制台打开 Run,需要工作空间成员权限。
^[a-z0-9][a-z0-9-]*$^\/.+$QUEUED 或 RUNNING 表示仍在执行。COMPLETED 表示已有数据提供商响应,包括非 2xx 响应。FAILED 请读取 failure。STOPPED 表示分派前停止。charge_usd 与状态分别检查。
QUEUED, RUNNING, COMPLETED, FAILED, STOPPED Run 失败原因,仅在 status 为 FAILED 时非 null。
Show child attributes
Show child attributes
各操作的规范化字段。数据提供商原生输出不在此重复,保留在 Run 中,可通过 GET /v1/runs/:id 读取。未报告的值为 null。
- search: results[]: url, title, snippet ,Google 摘要;Exa 为提取片段, position, published_at, date_text, date ,已弃用
- news: items[]: title, url, source, published_at, date_text, snippet
- places: items[]: name, address ,数据提供商原生文本,可能仅含街道, category, rating ,1–5, reviews, phone, website, latitude, longitude, google_cid
- scholar: items[]: title, url, snippet, publication, year, cited_by, pdf_url
- shopping: items[]: title, url ,Google Shopping 页面, merchant_url, google_product_id, price_text, seller, rating ,1–5, reviews, image_url
- images: items[]: title, image_url, thumbnail_url, source_url, source, width, height
- videos: items[]: title, url, channel, source, date_text, duration_text, snippet, thumbnail_url
- answer: answer, citations[]: url, title, published_at
- scrape: url, final_url, title, text, markdown, html, raw_html, text_character_limit, cached, fetched_at, quality ,已弃用
- similar: items[]: url, title, exa_similarity_score, published_at, author
published_at 为 ISO 8601 UTC,仅根据数据提供商机器时间戳填写。date_text 为 Google 原样日期文本,可能相对于 Run 的 completed_at,不解析。rating 为 Google 1–5 平均星级;reviews 为数量。source 为出版方或网站名称。exa_similarity_score 为 Exa 自身分数,只宜在同一响应内比较。
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
Show child attributes
Show child attributes
仅在 status 为 COMPLETED 时非 null。
- 2xx 响应:output 为任意结构的数据提供商原生 JSON;正文为空时为 null。
- 非 2xx 响应:error 包含数据提供商错误正文,output 为 null。
两种正文均会移除敏感字段。
Show child attributes
Show child attributes
此 Solution 响应所含 runs 的总费用,全部 Run 结算前为 null。每个 Run 保留各自费用;失败也可能收费。
^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$单个 Run 的计费依据;多个 Run 汇总时为 null。各项费用请查看 runs[].charge_basis。
Show child attributes
Show child attributes
当前是否可接受停止请求。不保证能在分派前停止 Run。
请求停止的时间。如果已开始分派,Run 仍可能继续。
ISO 8601 UTC 时间戳。
ISO 8601 UTC 时间戳。
ISO 8601 UTC 时间戳。
已保存的追踪字段,可用于筛选 Run,不发送给数据提供商,不影响路由、价格或幂等。
- 最多 20 个键:小写字母、数字和下划线,以字母开头,最长 40 个字符。
- 值:长度为 1–500 的字符串。
- user_id:终端用户的不透明 ID,不得使用邮箱或姓名。
Show child attributes
Show child attributes
search, news, places, scholar, shopping, images, videos, answer, scrape, similar 业务交付状态,与 status 中的最终 Run 生命周期独立。success 不代表内容语义质量已验证。
success, partial, no_result, error, pending text, markdown, html, raw_html Show child attributes
Show child attributes
Show child attributes
Show child attributes
通过认证读取规范化结果和总费用的只读 URL 路径,配合 API 服务地址使用。不创建 Run,也不恢复切换。GET /v1/runs/:id 仍返回原生单个 Run。