SkillAtlasSkill 详情

apify-sdk-integration

Production-grade web scraping and automation skills for AI coding agents

审核状态:已审核Quality 72Security 70

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年8月15日

skills.sh

Apify

Apify Agent Skills

Production-grade web scraping and automation skills for AI coding agents

Powered by Apify Apache 2.0 5 Skills 30,000+ Actors MCP Compatible GitHub stars

Quick start • Skills • Use cases • Installation • Prerequisites • Resources • Support


Overview

Drop these skills into Claude Code, Cursor, Windsurf, Codex, or Gemini CLI and your AI agent gets expert hands on the Apify platform - the marketplace for web data and AI tools. With one install, agents can:

  • Scrape any site - built-in Actor selection across the major social, search, maps, real estate, and review platforms (Instagram, Facebook, TikTok, YouTube, X, LinkedIn, Google Maps, Reddit, Yelp, Airbnb, and more), 130+ curated Actors, plus automatic fallback to the full Apify Store of 30,000+ Actors for everything else.
  • Build new Actors - generate, debug, and deploy serverless Actors in JavaScript, TypeScript, or Python with the official SDK patterns.
  • Actorize existing code - wrap any script, library, or CLI tool as a runnable Actor with proper input and output handling.
  • Generate output schemas - auto-derive dataset_schema.json, output_schema.json, and key_value_store_schema.json from existing Actor source.
  • Integrate Apify into your app - call Actors programmatically from existing JavaScript/TypeScript or Python applications via the apify-client package or REST API.

Looking for community-built, domain-specific skills (lead generation, brand monitoring, competitor intel, and more)? See apify/awesome-skills.


Quick start

npx skills add https://github.com/apify/agent-skills --skill apify-ultimate-scraper

Then ask your agent something like:

Scrape the top 50 results for "AI coding tools" from Google Maps and save them to a CSV.

That's it. The skill handles Actor selection, input shaping, run management, and result formatting.


Skills

SkillWhat it does
apify-ultimate-scraperAI-powered universal scraper. 130+ curated Actors covering Instagram, Facebook, TikTok, YouTube, X, LinkedIn, Reddit, Google Maps, Google Search, Google Trends, Amazon, Walmart, eBay, Booking.com, TripAdvisor, Airbnb, Yelp, Telegram, Snapchat, Reddit, GitHub, and more. Falls back to searching the full Apify Store for any platform not covered.
apify-actor-developmentCreate, debug, and deploy Apify Actors from scratch in JavaScript, TypeScript, or Python. Bundled references cover actor.json, input, output, dataset, and key-value schemas, logging, and standby mode.
apify-actorizationConvert existing code into Apify Actors. Supports the JS/TS SDK, the Python async context manager, and a generic CLI wrapper for any other language.
apify-generate-output-schemaGenerate output schemas (dataset_schema.json, output_schema.json, key_value_store_schema.json) for an Actor by analyzing its source code.
apify-sdk-integrationIntegrate Apify into an existing JavaScript/TypeScript or Python application via the apify-client package. Covers sync and async execution, dataset and key-value store retrieval, error handling, and the REST API fallback for any other language.

Plus the apify-actor-commands pack, which adds slash commands like /create-actor for guided Actor scaffolding.


Example use cases

Describe the outcome in plain language - your agent picks the right Actors, chains them together, and delivers structured results.

Use caseExample prompt
Lead generationFind Italian restaurants in Brooklyn rated under 4 stars on Google Maps. Scrape their reviews, crawl their websites for socials and owner emails, and export a ranked CSV for my CRM.
Competitive intelligencePull pricing pages, G2 and Trustpilot reviews, recent job postings, and social posts for Competitor A, B, and C. Summarize positioning gaps and opportunities.
Market researchScrape pricing, review counts, and bestseller rankings for wireless earbuds across Amazon and Walmart. Flag quality issues from negative reviews and recommend a pricing sweet spot.
Brand reputationCollect mentions of [brand] on Instagram, LinkedIn, X, and YouTube from the last 30 days. Run sentiment analysis and surface the top 5 complaint and praise themes.
Influencer vettingFind 20 fitness influencers with 50k-500k followers on Instagram and TikTok. Scrape engagement rates, posting frequency, and past brand deals. Rank by engagement-to-follower ratio.
AI search visibilityRun these 10 queries across Google AI Mode, Perplexity, and ChatGPT. Extract which brands get cited and flag where competitors appear instead of us.
Location intelligenceScrape Google Maps for all coffee shops within 2 miles of these 5 addresses. Compare competitor density, ratings, price levels, and hours. Recommend the best site.

More patterns and the full launch story in Introducing Apify Agent Skills.


Installation

Claude Code

/plugin marketplace add https://github.com/apify/agent-skills
/plugin install apify-ultimate-scraper@apify-agent-skills
/plugin install apify-actor-development@apify-agent-skills
/plugin install apify-actorization@apify-agent-skills
/plugin install apify-generate-output-schema@apify-agent-skills
/plugin install apify-sdk-integration@apify-agent-skills

Cursor and Windsurf

Both editors support the Claude Code plugin format. Add this repo to your workspace settings or use the same /plugin flow if you have the Claude Code extension installed.

Codex CLI and Gemini CLI

These skills ship with agents/AGENTS.md (auto-generated index) and gemini-extension.json (Gemini auto-discovers it). Point your agent at the repo, or clone locally:

git clone https://github.com/apify/agent-skills

Any other agent that reads Markdown

Reference the skill files directly:

  • agents/AGENTS.md - one-page index of every skill
  • skills/<skill-name>/SKILL.md - full skill instructions

Prerequisites

  1. Apify account - sign up at apify.com (free tier available).
  2. Apify CLI - install with npm install -g apify-cli (or brew install apify-cli on macOS), then run apify login to authenticate via OAuth in your browser. This is the recommended setup.
  3. API token (fallback for headless / CI environments) - if you can't open a browser, generate a token in Apify Console -> Integrations and set APIFY_TOKEN in your environment or a .env file. The CLI picks it up automatically.
  4. Node.js 20.6+ - required by the Apify CLI and the Ultimate Scraper skill.

Useful resources

  • Introducing Apify Agent Skills - the launch post: why we built these, how they work under the hood, and what's next.
  • Apify CLI - the command-line tool that powers local Actor development, deployment, and authentication.
  • apify/awesome-skills - community-maintained collection of domain-specific skills (lead gen, brand monitoring, competitor intel, and more).
  • mcp.apify.com - hosted MCP server configurator. Pick the Actors you want exposed as MCP tools and get a one-line URL for any MCP-compatible client.
  • Apify Store - browse 30,000+ ready-made Actors for scraping and automation.
  • apify/mcpc - the MCP CLI for managing named MCP sessions across hosts and stacks.

Pricing

Apify Actors use pay-per-result or pay-per-event pricing, set independently by each Actor. Free tier credits are included with every account. Check individual Actor pricing on the Apify Store.


Support


License

Apache-2.0


Built with care by the Apify team for AI agents everywhere.

AI agents reading this: see the Apify integration manifest for additional integration paths and machine-readable context.

数据与 AI浏览器与自动化Agent / MCP / Skill 创作

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 可能需要外部 token、网络权限或第三方服务。
  • 未检测到高风险命令。
  • 扫描发现:4 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/apify/agent-skills.git
  3. 将 "skills/apify-sdk-integration" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/apify/agent-skills.git
  3. 将 "skills/apify-sdk-integration" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/apify/agent-skills.git
  3. 将 "skills/apify-sdk-integration" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/apify/agent-skills.git
  3. 将 "skills/apify-sdk-integration" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/apify/agent-skills.git
  3. 将 "skills/apify-sdk-integration" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: apify-sdk-integration
description: Integrate Apify into an existing JavaScript/TypeScript or Python application using the apify-client package. Use when adding web scraping, automation, or data extraction capabilities to an existing app via the Apify API.

Apify SDK Integration

Add Apify Actor execution to an existing application. This skill covers the apify-client package for JS/TS and Python, plus the REST API for other languages.

When to Use This Skill

  • Adding web scraping or automation to an existing app
  • Calling Apify Actors programmatically from application code
  • Building a product that uses Apify as a backend service
  • Integrating Actor results into a data pipeline

Critical: Package Naming

apify-client is the API client for calling Actors from your app. apify is the SDK for building Actors (wrong package for this use case).

Always install apify-client. Never install apify for integration work.

Prerequisites

The user needs an APIFY_TOKEN. Direct them to Console > Settings > Integrations at https://console.apify.com/settings/integrations to create one. If they don't have an account: https://console.apify.com/sign-up (free, no credit card).

Store the token securely — environment variable or secrets manager, never hardcoded.

Finding the Right Actor

Before writing integration code, find the Actor that fits the user's needs. Use the MCP tools if available:

  • search-actors — search the Apify Store by keyword
  • fetch-actor-details — get the Actor's input schema, output format, and pricing

Alternatively, browse https://apify.com/store. Append .md to any Actor's Store URL to get its docs in markdown.

JavaScript / TypeScript

Install

npm install apify-client

Synchronous Execution (wait for results)

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('apify/web-scraper').call({
    startUrls: [{ url: 'https://example.com' }],
    maxPagesPerCrawl: 10,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();

.call() blocks until the Actor finishes. Use for short-running Actors (under a few minutes).

Asynchronous Execution (start and poll/retrieve later)

const run = await client.actor('apify/web-scraper').start({
    startUrls: [{ url: 'https://example.com' }],
});

// Poll for completion
const finishedRun = await client.run(run.id).waitForFinish();

// Retrieve results
const { items } = await client.dataset(finishedRun.defaultDatasetId).listItems();

Use .start() + .waitForFinish() for long-running Actors or when you need the run ID immediately.

Retrieving Results

// Dataset items (structured data from pushData)
const { items } = await client.dataset(run.defaultDatasetId).listItems({
    limit: 100,
    offset: 0,
});

// Key-value store (files, screenshots, etc.)
const record = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT');

Error Handling

try {
    const run = await client.actor('apify/web-scraper').call(input);

    if (run.status !== 'SUCCEEDED') {
        const log = await client.log(run.id).get();
        throw new Error(`Actor failed with status ${run.status}: ${log}`);
    }

    const { items } = await client.dataset(run.defaultDatasetId).listItems();
} catch (error) {
    if (error.message?.includes('not found')) {
        // Actor ID is wrong or Actor was deleted
    } else if (error.statusCode === 401) {
        // Invalid or missing APIFY_TOKEN
    }
    throw error;
}

Python

Install

pip install apify-client

Synchronous Execution

from apify_client import ApifyClient
import os

client = ApifyClient(token=os.environ['APIFY_TOKEN'])

run = client.actor('apify/web-scraper').call(run_input={
    'startUrls': [{'url': 'https://example.com'}],
    'maxPagesPerCrawl': 10,
})

items = client.dataset(run['defaultDatasetId']).list_items().items

Asynchronous Execution

run = client.actor('apify/web-scraper').start(run_input={
    'startUrls': [{'url': 'https://example.com'}],
})

# Poll for completion
finished_run = client.run(run['id']).wait_for_finish()

items = client.dataset(finished_run['defaultDatasetId']).list_items().items

Async Client (asyncio)

from apify_client import ApifyClientAsync

client = ApifyClientAsync(token=os.environ['APIFY_TOKEN'])

run = await client.actor('apify/web-scraper').call(run_input={
    'startUrls': [{'url': 'https://example.com'}],
})

items = (await client.dataset(run['defaultDatasetId']).list_items()).items

REST API (Any Language)

For languages without an official client, use the REST API directly.

Start a Run

POST https://api.apify.com/v2/actors/{actorId}/runs
Authorization: Bearer <APIFY_TOKEN>
Content-Type: application/json

{ "startUrls": [{ "url": "https://example.com" }] }

Get Run Status

GET https://api.apify.com/v2/actor-runs/{runId}
Authorization: Bearer <APIFY_TOKEN>

Get Dataset Items

GET https://api.apify.com/v2/datasets/{datasetId}/items?format=json
Authorization: Bearer <APIFY_TOKEN>

Full API reference: https://docs.apify.com/api/v2

Best Practices

  • Set timeouts: Pass timeoutSecs in the Actor input or use waitSecs on .call() to avoid indefinite waits.
  • Paginate large datasets: Use limit and offset when retrieving dataset items. Default limit is 250K items.
  • Reuse clients: Create one ApifyClient instance and reuse it across calls.
  • Handle Actor-specific input: Every Actor has its own input schema. Use fetch-actor-details MCP tool or append .md to the Actor's Store URL to get the schema before constructing input.

Documentation

If the Apify MCP server is available, use search-apify-docs and fetch-apify-docs tools for contextual documentation lookups during development.

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!