curl --request POST \
--url https://api.olostep.com/v1/searches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "Best Answer Engine Optimization startups"
}
'{
"storage": {
"expires_in": "7d"
},
"id": "search_9bi0sbj9xa",
"object": "search",
"created": 1760327323,
"metadata": {},
"query": "Best Answer Engine Optimization startups",
"credits_consumed": 10,
"result": {
"json_content": "<string>",
"json_hosted_url": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>",
"description": "<string>",
"markdown_content": "<string>",
"html_content": "<string>"
}
],
"people": [
{}
],
"companies": [
{}
],
"parameters": {
"name": "<string>",
"job_title": "<string>",
"location": "<string>",
"years_of_experience": 123,
"current_employer": "<string>",
"size": 123,
"revenue_usd": 123
},
"size_exceeded": true,
"credits_consumed": 123
}
}创建搜索
使用自然语言查询搜索网络,并返回一个去重的相关链接列表,包含标题和描述。 它将在网络上语义搜索查询并返回结果。 可以选择传递 scrape_options 来抓取每个返回的 URL,并将 markdown_content / html_content 直接嵌入到每个链接中。页面抓取会通过底层的 /v1/scrapes 端点自动计费到你的团队。 参见 搜索功能。
curl --request POST \
--url https://api.olostep.com/v1/searches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "Best Answer Engine Optimization startups"
}
'{
"storage": {
"expires_in": "7d"
},
"id": "search_9bi0sbj9xa",
"object": "search",
"created": 1760327323,
"metadata": {},
"query": "Best Answer Engine Optimization startups",
"credits_consumed": 10,
"result": {
"json_content": "<string>",
"json_hosted_url": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>",
"description": "<string>",
"markdown_content": "<string>",
"html_content": "<string>"
}
],
"people": [
{}
],
"companies": [
{}
],
"parameters": {
"name": "<string>",
"job_title": "<string>",
"location": "<string>",
"years_of_experience": 123,
"current_employer": "<string>",
"size": 123,
"revenue_usd": 123
},
"size_exceeded": true,
"credits_consumed": 123
}
}storage.expires_in 以将此搜索的存储文件保留时间延长至默认的 7 天以上。取值:7d、10d、30d、60d、90d、180d、365d 或 never。详情请参见 存储。category.type 设置为 people 或 companies 以从自然语言的 query、明确的 category.parameters 或两者中搜索专业档案或公司。结果返回在 result.people 或 result.companies 中。请参见 人员和公司搜索。授权
Bearer认证头的格式为Bearer ,其中是你的认证令牌。
请求体
控制此搜索的存储文件(其文件和任何抓取的链接内容)保留多长时间。如果省略,它们将保留 7 天。实际生效的值在响应中以 storage.expires_in 返回。请参阅功能文档中的存储部分。无效值返回 400,代码为 invalid_storage_expires_in。
Show child attributes
Show child attributes
自然语言的搜索查询,可以是任何语言。除非 category.type 是 people 或 companies,否则是必需的,在这种情况下可以发送 category.parameters。对于 people 或 companies,它会被翻译成 category.parameters。
"What's going on with OpenAI's Sora shutting down?"
要搜索的内容。any(默认)是网络搜索。people 和 companies 搜索专业档案和公司:发送自然语言的 query、parameters 或两者。然后忽略 limit、include_domains、exclude_domains 和 scrape_options。当返回至少一个结果时,人员或公司搜索花费 40 个积分,否则为 0。
Show child attributes
Show child attributes
去重后返回的最大链接数量。
1 <= x <= 2510
将结果限制在这些域名中。仅限裸主机——自动去除前导 http(s):// 和尾部斜杠。
["nytimes.com", "wsj.com"]
排除这些域名的结果。仅限裸主机——自动去除前导 http(s):// 和尾部斜杠。
["reddit.com"]
使用你的查询逐字请求直接、低延迟的搜索。默认模式执行更广泛的搜索,以获得更广泛的结果覆盖。
可选。当提供时,每个返回的链接也会被抓取,其内容嵌入到响应中。每页抓取的费用会通过底层的 /v1/scrapes 端点自动计费。
Show child attributes
Show child attributes
响应
搜索结果的成功响应。
应用于此搜索存储文件的保留。
Show child attributes
Show child attributes
"search_9bi0sbj9xa"
"search"
1760327323
"Best Answer Engine Optimization startups"
此请求消耗的总积分:5 个基础搜索积分 + 使用 scrape_options 时每页抓取积分的总和。
10
Show child attributes
Show child attributes
此页面对您有帮助吗?