Perplexity 爬虫
scraper.perplexity 执行器返回的 Perplexity 响应中包含了相关的提示词、引用和媒体资源,以便您评估该模型在不同市场中的回答表现。
请求示例
curl 'https://api.scrapeless.com/api/v2/scraper/request' \
--header 'Content-Type: application/json' \
--header 'x-api-token: {you_api_key}' \
--data '{
"actor": "scraper.perplexity",
"input": {
"prompt": "Recommended attractions in New York",
"country": "US",
"web_search": true
},
"webhook": {
"url": "http://www.youwebhook.com"
}
}'请求体参数
| 参数 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
prompt | string | 是 | 发送给 Perplexity 的提示词。 |
country | string | 是 | 国家或地区代码。 |
web_search | boolean | 否 | 启用或禁用网络搜索。 |
should_fetch_share_link | boolean | 否 | 获取分享链接。 |
响应字段
| 参数 | 类型 | 描述 |
|---|---|---|
prompt | string | 原始提示词。 |
result_text | string | Perplexity 返回的 Markdown 格式回答。 |
related_prompt | array | 相关的后续追问问题。 |
web_results | array | Perplexity 引用的搜索数据。 |
web_results.name | string | 来源标题。 |
web_results.url | string | 来源 URL。 |
web_results.snippet | string | 简短摘要或描述。 |
media_items | array | Perplexity 返回的媒体引用。 |
media_items.medium | string | 媒体类型,例如 map 或 video。 |
media_items.url | string | 媒体资源链接。 |
media_items.image | string | 预览图片。 |
media_items.source | string | 来源(例如 web、youtube)。 |
media_items.thumbnail | string | 缩略图 URL。 |
media_items.locations | array | map 媒体的位置数据。 |
media_items.locations.lat | float | 纬度。 |
media_items.locations.lng | float | 经度。 |
media_items.locations.name | string | 地点名称。 |
media_items.locations.description | string | 地点描述。 |
media_items.locations.image_url | string | 图片链接。 |
media_items.locations.num_reviews | int | 评论数量。 |
media_items.locations.url | string | 目标 URL。 |
media_items.locations.categories | array | 关联分类。 |
media_items.locations.address | array | 地址行。 |
share_url | string | 分享链接。 |
shopping | array | Perplexity 响应中包含的产品推荐。每个条目包含来源域名、图片 URL、标题和链接。 |
shopping.domain | string | 托管推荐内容的网站域名,例如 smzdm.com。 |
shopping.image | string | 产品图片 URL。 |
shopping.title | string | 推荐产品或优惠的标题。 |
shopping.url | string | 来源网站上产品或优惠页面的链接。 |