Community研究與資料分析github.com

ComposioHQ/Apify-Automation

透過 Composio Apify 整合自動化執行網頁爬取與資料擷取 — 執行 Actors、管理資料集、建立可重複使用的任務,以及取得爬梳結果。

Apify-Automation 是什麼?

這項技能讓 Claude Code 能直接與 Apify 平台整合,透過 Composio 的工具集自動化執行網頁爬取與資料擷取。使用者不需離開終端機,即可同步或非同步執行 Apify Actors、管理資料集、建立可重複使用的任務,並檢視執行記錄。支援的作業包含:同步執行 Actor 並立即取得資料集項目、非同步觸發長時間爬取任務、分頁查詢資料集、檢視 Actor 詳細資料與輸入結構描述、以及建立排程自動化任務。此技能特別適合需要定期從網站擷取結構化資料(如商家評論、搜尋結果、社交媒體貼文)的開發者與資料分析師。使用前需先將 Composio MCP 伺服器加入設定,並透過驗證連結連接 Apify 帳號。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/apify-automation

Installed? Explore more 研究與資料分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Apify 自動化

直接在 Claude Code 中執行 Apify 網頁爬取 Actors 並管理資料集。無需離開終端機,即可同步或非同步執行爬蟲、擷取結構化資料、建立可重複使用的任務,以及檢查執行記錄。

工具包文件: composio.dev/toolkits/apify


設定

  1. 將 Composio MCP 伺服器加入你的設定:
    https://rube.app/mcp
    
  2. 出現提示時連接你的 Apify 帳號。系統會提供一個驗證連結。
  3. 瀏覽 apify.com/store 上的可用 Actors。每個 Actor 都有獨特的輸入結構描述 — 執行前請務必查看該 Actor 的文件說明。

核心工作流程

1. 同步執行 Actor 並取得結果

在單一呼叫中執行 Actor 並立即擷取其資料集項目。最適合快速擷取作業。

工具: APIFY_RUN_ACTOR_SYNC_GET_DATASET_ITEMS

關鍵參數:

  • actorId(必填)— Actor ID,格式為 username/actor-name(例如 compass/crawler-google-places)
  • input — 符合 Actor 結構描述的 JSON 輸入物件。每個 Actor 都有獨特的欄位名稱 — 請至 apify.com/store 查看確切結構描述。
  • limit — 最大回傳項目數
  • offset — 分頁跳過項目數
  • format — json(預設)、csv、jsonl、html、xlsx、xml
  • timeout — 執行逾時秒數
  • waitForFinish — 最長等待時間(0-300 秒)
  • fields — 要包含的欄位,以逗號分隔
  • omit — 要排除的欄位,以逗號分隔

範例提示詞:「執行紐約餐廳的 Google 商家爬蟲,並回傳前 50 筆結果」


2. 非同步執行 Actor

觸發 Actor 執行但不等候完成。適用於長時間執行的爬取作業。

工具: APIFY_RUN_ACTOR

關鍵參數:

  • actorId(必填)— Actor slug 或 ID
  • body — 提供給 Actor 的 JSON 輸入物件
  • memory — 記憶體限制 (MB),必須是 2 的次方,最小值 128
  • timeout — 執行逾時秒數
  • maxItems — 回傳項目上限
  • build — 特定建置標籤(例如 latest、beta)

後續使用 APIFY_GET_DATASET_ITEMS 並提供執行的 datasetId 來擷取結果。

範例提示詞:「以非同步方式啟動 example.com 的網頁爬蟲 Actor,記憶體設定為 1024MB」


3. 擷取資料集項目

從特定資料集中擷取資料,支援分頁、欄位選取與篩選。

工具: APIFY_GET_DATASET_ITEMS

關鍵參數:

  • datasetId(必填)— 資料集識別碼
  • limit(預設/最大 1000)— 每頁項目數
  • offset(預設 0)— 分頁偏移量
  • format — json(建議)、csv、xlsx
  • fields — 僅包含特定欄位
  • omit — 排除特定欄位
  • clean — 移除 Apify 特定中繼資料
  • desc — 反向排序(最新在前)

範例提示詞:「從資料集 myDatasetId 取得前 500 筆項目,格式為 JSON」


4. 檢視 Actor 詳細資料

在執行 Actor 前查看其中繼資料、輸入結構描述與設定。

工具: APIFY_GET_ACTOR

關鍵參數:

  • actorId(必填)— Actor ID,格式為 username/actor-name 或十六進位 ID

範例提示詞:「顯示 apify/web-scraper Actor 的詳細資料與輸入結構描述」


5. 建立可重複使用的任務

為 Actor 設定預設輸入,建立可重複使用的任務,用於週期性爬取作業。

工具: APIFY_CREATE_TASK

一次性設定任務,之後即可使用一致的輸入參數重複觸發。適合排程或週期性的資料收集工作流程。

範例提示詞:「為 Google 搜尋爬蟲建立一個 Apify 任務,預設查詢為『AI startups』,地點設為美國」


6. 管理執行與資料集

列出 Actor 執行、瀏覽資料集,以及檢視執行詳細資訊,用於監控與除錯。

工具: APIFY_GET_LIST_OF_RUNS、APIFY_DATASETS_GET、APIFY_DATASET_GET、APIFY_GET_LOG

列出執行:

  • 依 Actor 篩選,並可依狀態篩選
  • 從執行詳細資訊取得 datasetId,用於資料擷取

資料集管理:

  • APIFY_DATASETS_GET — 列出所有資料集,支援分頁
  • APIFY_DATASET_GET — 取得特定資料集的中繼資料

除錯:

  • APIFY_GET_LOG — 擷取指定執行或建置的執行記錄

範例提示詞:「列出網頁爬蟲 Actor 最近 10 次執行,並顯示最新一次的記錄」


已知陷阱

  • Actor 輸入結構描述差異極大: 每個 Actor 都有自己獨特的輸入欄位。使用 queries 或 search_terms 這類通用欄位名稱會被拒絕。請務必在 apify.com/store 上查看 Actor 頁面,以確定確切的欄位名稱(例如 Google 商家地圖的 searchStringsArray、網頁爬蟲的 startUrls)。
  • URL 格式要求: URL 中務必包含完整的通訊協定(https:// 或 http://)。許多 Actor 要求將 URL 設為帶有 url 屬性的物件:{"startUrls": [{"url": "https://example.com"}]}。
  • 資料集分頁上限: APIFY_GET_DATASET_ITEMS 的 limit 最大值為每次 1000 筆。對於大型資料集,請使用 offset 迴圈處理以收集所有項目。
  • 列舉值為小寫: 大多數 Actor 預期列舉值為小寫(例如 relevance 而非 RELEVANCE、all 而非 ALL)。
  • 同步逾時限制 5 分鐘: APIFY_RUN_ACTOR_SYNC_GET_DATASET_ITEMS 的 waitForFinish 最大值為 300 秒。對於較長時間的執行,請改用 APIFY_RUN_ACTOR(非同步),並以 APIFY_GET_DATASET_ITEMS 輪詢結果。
  • 資料量成本: 大型資料集的擷取費用可能很高。建議使用適度限制與增量處理,以避免逾時或記憶體壓力。
  • 建議使用 JSON 格式: 雖然支援 CSV/XLSX 格式,但 JSON 是自動化處理中最可靠的方式。下游自動化應避免使用 CSV/XLSX。

快速參考

工具 Slug說明
APIFY_RUN_ACTOR_SYNC_GET_DATASET_ITEMS同步執行 Actor 並立即取得結果
APIFY_RUN_ACTOR非同步執行 Actor(觸發後回傳)
APIFY_RUN_ACTOR_SYNC同步執行 Actor,回傳輸出記錄
APIFY_GET_ACTOR取得 Actor 中繼資料與輸入結構描述
APIFY_GET_DATASET_ITEMS從資料集中擷取項目(支援分頁)
APIFY_DATASET_GET取得資料集中繼資料(例如項目數量)
APIFY_DATASETS_GET列出所有使用者資料集
APIFY_CREATE_TASK建立可重複使用的 Actor 任務
APIFY_GET_TASK_INPUT檢視任務儲存的輸入內容
APIFY_GET_LIST_OF_RUNS列出某 Actor 的執行記錄
APIFY_GET_LOG取得某次執行的執行記錄

由 Composio 提供支援

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能