Search
Search 用于根据关键词、地区、语言等参数获取搜索结果,并支持高级 Google SERP 参数。
- 通过关键词发现相关页面
- 指定语言/地区获取更贴近目标市场的结果
- 使用高级 Google SERP 参数获取精细结果
详情请参阅 Search API 参考。
使用 XCrawl 获取关键词搜索结果
/search 接口
使用方式
curl -s -X POST 'https://run.xcrawl.com/v1/search' \
-H 'Authorization: Bearer $XCRAWL_API_KEY'\
-H 'Content-Type: application/json' \
-d '{
"query": "site:docs.xcrawl.com XCrawl API",
"location": "US",
"language": "en",
"limit": 2
}'响应示例
{
"search_id": "01KKE8BNMEKRHJB9GEWXPYQ8E1",
"endpoint": "search",
"version": "dca0d4b3bff035e4",
"status": "completed",
"query": "site:docs.xcrawl.com XCrawl API",
"data": {
"credits_used": 2,
"data": [
{
"position": 1,
"title": null,
"url": "https://docs.xcrawl.com/"
},
{
"position": 2,
"title": null,
"url": "https://docs.xcrawl.com/doc/developer-guides/authentication/"
}
],
"status": "success"
},
"started_at": "",
"ended_at": "",
"total_credits_used": 2
}