Google AI 模式抓取器

scraper.aimode 完整返回 Google AI 模式的响应,包括渲染后的 HTML、原始 URL 和详细的引用数据,以便您审核结果在不同地区下的差异。

请求示例

curl 'https://api.scrapeless.com/api/v2/scraper/request' \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: {you_api_key}' \
  --data '{
    "actor": "scraper.aimode",
    "input": {
      "prompt": "Recommended attractions in New York",
      "country": "US",
      "shopping": true
    },
    "webhook": {
      "url": "http://www.youwebhook.com"
    }
  }'

请求体参数

参数类型是否必填描述
promptstring是发送给 Google AI 模式的提示词。
countrystring是国家或地区代码。
shoppingboolean否是否获取购物数据。默认为 true。启用后,响应将在 products 字段中包含额外的产品信息——每个产品集群背后的商家报价,例如直接商店链接、价格、分期付款、库存、配送和退货政策。
locationstring否用于地理定向结果的 Google 规范位置名称(例如:New York,New York,United States)。请参阅 Google 的地理定位列表 获取所有支持的位置。与 uule 互斥。
uulestring否预编码的 Google UULE 字符串,用于精确的地理定向。当您已有预构建的 UULE 值而非位置名称时使用此参数。与 location 互斥。
urlstring否Google AI 模式的完整访问链接。与所有其他参数互斥。 如果填写此参数,则无需传递其他请求参数,即使传递也会被自动忽略。
should_fetch_share_linkboolean否获取分享链接。
should_fetch_htmlboolean否获取 HTML。

响应字段

注意: 当启用 shopping 且响应返回此额外产品信息时,API 调用将按基础费率的 2 倍计费。这是由于从多个来源提取和处理产品信息需要额外的资源开销。

参数类型描述
result_textstring回答正文。
result_mdstringMarkdown 格式的回答正文。
result_htmlstring回答的 HTML 版本。
raw_urlstring原始 Google AI 模式 URL。
citationsarray引用来源。
citations.snippetstring引用文章的摘要。
citations.thumbnailstring引用文章的封面图片。
citations.titlestring引用标题。
citations.urlstring引用 URL。
citations.website_namestring网站名称。
citations.faviconstring网站图标。
search_resultarrayGoogle 引用的可选搜索结果。
search_result.snippetstring搜索结果摘要。
search_result.thumbnailstring搜索结果封面图片。
search_result.titlestring搜索结果标题。
search_result.urlstring搜索结果链接。
search_result.website_namestring搜索结果网站名称。
productsarrayGoogle AI 模式返回的产品信息。
products.thumbnailsarray产品缩略图 URL 数组。
products.titlestring产品标题。
products.urlstring产品页面 URL。
products.brandstring产品品牌名称。
products.reviewsint评论数量。
products.ratingstring平均评分。
products.price_rangestring价格范围,例如 $2,499.99。
products.storesarray商家报价数组。
products.stores.namestring商家名称。
products.stores.linkstring商家产品链接。
products.stores.titlestring商家处的产品标题。
products.stores.ratingsstring商家评分,例如 4.3/5。
products.stores.extensionsarray附加信息(库存、配送、退货)。
products.stores.pricestring商家价格。
products.stores.delivery_feestring配送费信息。
products.stores.total_pricestring含费用的总价。
products.about_the_productobject详细产品信息。
products.about_the_product.titlestring区块标题。
products.about_the_product.linkstring产品页面链接。
products.about_the_product.displayed_linkstring显示的域名。
products.about_the_product.featuresarray产品特性/规格。
products.about_the_product.features.titlestring特性名称。
products.about_the_product.features.valuestring特性值。
products.about_the_product.descriptionstring产品描述。
products.variantsarray产品变体选项。
products.variants.titlestring变体类别标题。
products.variants.itemsarray变体选项列表。
products.variants.items.namestring变体选项名称。
products.variants.items.selectedbool是否已选中此变体。
products.variants.items.availabilitybool变体可用状态。
products.ratingsarray评分分布数据。
products.ratings.starsint星级评分等级(1-5)。
products.ratings.amountint该等级的评分数量。
products.user_reviewsarray用户评论数据。
products.user_reviews.textstring评论文本内容。
products.user_reviews.sourcestring评论来源平台。
products.user_reviews.ratingint用户评分。
products.user_reviews.datestring评论日期。
products.user_reviews.namestring评论者姓名。
products.user_reviews.titlestring评论标题。
share_urlstring分享链接。
htmlstringHTML 数据。