SuperAPI AI 工具集

apify-yandex-search-api

编程与开发

查看项目

更新于 10-15 19:57

技能介绍

用途:在未注册 Yandex 官方 API 密钥的情况下,把 Yandex 搜索结果页抓取为结构化 JSON 或 CSV,适合俄语市场的 SEO 与竞品研究,或查看某查询在 yandex.ru 按城市/地区的排名情况。不适用于长期关键词排名跟踪、反向图片搜索或 Google SERP。

主要能力:每个数据集条目对应某一结果类型的一页,用 item_type 标记(organic、ads、knowledge_graph、inline_images、inline_videos)。自然结果位于 organic_results 数组,含 position、title、link、displayed_link、snippet,以及 Yandex 展示时的 date、rich_snippet、sitelinks;其他类型分别使用 ads_results、knowledge_graph、inline_images、inline_videos 数组。条目还带 total_results_found、page_number、pages_processed、pagination_limit_reached 等元数据。

使用方式:需 Apify 账号,通过 apify login 或 APIFY_TOKEN 环境变量认证。Actor ID 为 johnvc/Scrape-Yandex。CLI 调用示例:apify actors call "johnvc/Scrape-Yandex" -i '{"text":"crm software","max_pages":2}' --json --user-agent apify-awesome-skills/apify-yandex-search-api 2>/dev/null。每次调用需带 --json、--user-agent 和 2>/dev/null 三个标志。也可通过 MCP 在 Claude 等 AI 智能体中使用,托管服务器地址为 https://mcp.apify.com/?tools=actors,docs,johnvc/Scrape-Yandex。运行后用 apify datasets get-items "$DATASET_ID" --format json 读取结果。

输入:text 为唯一必填项;yandex_domain(6 个域名,默认 yandex.com)、lang(19 种语言)、lr(地区 ID,如 213 为莫斯科、2 为圣彼得堡);include_organic_results 默认开启,另有 include_ads、include_knowledge_graph、include_inline_images、include_inline_videos;max_pages 默认 2,groups_on_page 默认 10;sort_mode(relevance 或 date)、period、family_mode、fix_typo。

限制:计费为每次运行小额启动费加按页费,成本大致与 max_pages 成正比,默认两页运行费用远低于一美元。position 每页重新计数,需结合 page_number 解读;排名反映抓取时所选 lr 地区的结果,会因地区和运行波动。知识图谱、广告和内联媒体仅在 Yandex 对该查询展示时出现。该技能只读取 SERP,不做长期排名跟踪。若自然结果为空,可手动核对查询、尝试 fix_typo 或放宽查询;市场不符时需同时设置 yandex_domain、lang 和 lr。