AnyCrawl Skill
AnyCrawl API integration for OpenClaw - Scrape, Crawl, and Search web content with high-performance multi-threaded crawling.
Setup
Method 1: Environment variable (Recommended)
export ANYCRAWL_API_KEY="your-api-key"
Make it permanent by adding to ~/.bashrc or ~/.zshrc:
echo 'export ANYCRAWL_API_KEY="your-api-key"' >> ~/.bashrc
source ~/.bashrc
Get your API key at: https://anycrawl.dev
Method 2: OpenClaw gateway config
openclaw config.patch --set ANYCRAWL_API_KEY="your-api-key"
Functions
1. anycrawl_scrape
Scrape a single URL and convert to LLM-ready structured data.
Parameters:
url (string, required): URL to scrape
engine (string, optional): Scraping engine - "cheerio" (default), "playwright", "puppeteer"
formats (array, optional): Output formats - ["markdown"], ["html"], ["text"], ["json"], ["screenshot"]
timeout (number, optional): Timeout in milliseconds (default: 30000)
wait_for (number, optional): Delay before extraction in ms (browser engines only)
wait_for_selector (string/object/array, optional): Wait for CSS selectors
include_tags (array, optional): Include only these HTML tags (e.g., ["h1", "p", "article"])
exclude_tags (array, optional): Exclude these HTML tags
proxy (string, optional): Proxy URL (e.g., "http://proxy:port")
json_options (object, optional): JSON extraction with schema/prompt
extract_source (string, optional): "markdown" (default) or "html"
Examples:
// Basic scrape with default cheerio
anycrawl_scrape({ url: "https://example.com" })
// Scrape SPA with Playwright
anycrawl_scrape({
url: "https://spa-example.com",
engine: "playwright",
formats: ["markdown", "screenshot"]
})
// Extract structured JSON
anycrawl_scrape({
url: "https://product-page.com",
engine: "cheerio",
json_options: {
schema: {
type: "object",
properties: {
product_name: { type: "string" },
price: { type: "number" },
description: { type: "string" }
},
required: ["product_name", "price"]
},
user_prompt: "Extract product details from this page"
}
})
2. anycrawl_search
Search Google and return structured results.
Parameters:
query (string, required): Search query
engine (string, optional): Search engine - "google" (default)
limit (number, optional): Max results per page (default: 10)
offset (number, optional): Number of results to skip (default: 0)
pages (number, optional): Number of pages to retrieve (default: 1, max: 20)
lang (string, optional): Language locale (e.g., "en", "zh", "vi")
safe_search (number, optional): 0 (off), 1 (medium), 2 (high)
scrape_options (object, optional): Scrape each result URL with these options
Examples:
// Basic search
anycrawl_search({ query: "OpenAI ChatGPT" })
// Multi-page search in Vietnamese
anycrawl_search({
query: "hướng dẫn Node.js",
pages: 3,
lang: "vi"
})
// Search and auto-scrape results
anycrawl_search({
query: "best AI tools 2026",
limit: 5,
scrape_options: {
engine: "cheerio",
formats: ["markdown"]
}
})
3. anycrawl_crawl_start
Start crawling an entire website (async job).
Parameters:
url (string, required): Seed URL to start crawling
engine (string, optional): "cheerio" (default), "playwright", "puppeteer"
strategy (string, optional): "all", "same-domain" (default), "same-hostname", "same-origin"
max_depth (number, optional): Max depth from seed URL (default: 10)
limit (number, optional): Max pages to crawl (default: 100)
include_paths (array, optional): Path patterns to include (e.g., ["/blog/*"])
exclude_paths (array, optional): Path patterns to exclude (e.g., ["/admin/*"])
scrape_paths (array, optional): Only scrape URLs matching these patterns
scrape_options (object, optional): Per-page scrape options
Examples:
// Crawl entire website
anycrawl_crawl_start({
url: "https://docs.example.com",
engine: "cheerio",
max_depth: 5,
limit: 50
})
// Crawl only blog posts
anycrawl_crawl_start({
url: "https://example.com",
strategy: "same-domain",
include_paths: ["/blog/*"],
exclude_paths: ["/blog/tags/*"],
scrape_options: {
formats: ["markdown"]
}
})
// Crawl product pages only
anycrawl_crawl_start({
url: "https://shop.example.com",
strategy: "same-domain",
scrape_paths: ["/products/*"],
limit: 200
})
4. anycrawl_crawl_status
Check crawl job status.
Parameters:
job_id (string, required): Crawl job ID
Example:
anycrawl_crawl_status({ job_id: "7a2e165d-8f81-4be6-9ef7-23222330a396" })
5. anycrawl_crawl_results
Get crawl results (paginated).
Parameters:
job_id (string, required): Crawl job ID
skip (number, optional): Number of results to skip (default: 0)
Example:
// Get first 100 results
anycrawl_crawl_results({ job_id: "xxx", skip: 0 })
// Get next 100 results
anycrawl_crawl_results({ job_id: "xxx", skip: 100 })
6. anycrawl_crawl_cancel
Cancel a running crawl job.
Parameters:
job_id (string, required): Crawl job ID
7. anycrawl_search_and_scrape
Quick helper: Search Google then scrape top results.
Parameters:
query (string, required): Search query
max_results (number, optional): Max results to scrape (default: 3)
scrape_engine (string, optional): Engine for scraping (default: "cheerio")
formats (array, optional): Output formats (default: ["markdown"])
lang (string, optional): Search language
Example:
anycrawl_search_and_scrape({
query: "latest AI news",
max_results: 5,
formats: ["markdown"]
})
Engine Selection Guide
| Engine |
Best For |
Speed |
JS Rendering |
cheerio |
Static HTML, news, blogs |
⚡ Fastest |
❌ No |
playwright |
SPAs, complex web apps |
🐢 Slower |
✅ Yes |
puppeteer |
Chrome-specific, metrics |
🐢 Slower |
✅ Yes |
Response Format
All responses follow this structure:
{
"success": true,
"data": { ... },
"message": "Optional message"
}
Error response:
{
"success": false,
"error": "Error type",
"message": "Human-readable message"
}
Common Error Codes
400 - Bad Request (validation errors)
401 - Unauthorized (invalid API key)
402 - Payment Required (insufficient credits)
404 - Not Found
429 - Rate limit exceeded
500 - Internal server error
API Limits
- Rate limits apply based on your plan
- Crawl jobs expire after 24 hours
- Max crawl limit: depends on credits
Links
1---
2name: anycrawl-skill
3description: AnyCrawl API integration for OpenClaw - Scrape, Crawl, and Search
4 web content with high-performance multi-threaded crawling.
5metadata:
6 source: https://skillmd.com/skills/modbender/anycrawl-skill
7---
8
9# AnyCrawl Skill
10
11AnyCrawl API integration for OpenClaw - Scrape, Crawl, and Search web content with high-performance multi-threaded crawling.
12
13## Setup
14
15### Method 1: Environment variable (Recommended)
16
17```bash
18export ANYCRAWL_API_KEY="your-api-key"
19```
20
21Make it permanent by adding to `~/.bashrc` or `~/.zshrc`:
22```bash
23echo 'export ANYCRAWL_API_KEY="your-api-key"' >> ~/.bashrc
24source ~/.bashrc
25```
26
27Get your API key at: https://anycrawl.dev
28
29### Method 2: OpenClaw gateway config
30
31```bash
32openclaw config.patch --set ANYCRAWL_API_KEY="your-api-key"
33```
34
35## Functions
36
37### 1. anycrawl_scrape
38
39Scrape a single URL and convert to LLM-ready structured data.
40
41**Parameters:**
42- `url` (string, required): URL to scrape
43- `engine` (string, optional): Scraping engine - `"cheerio"` (default), `"playwright"`, `"puppeteer"`
44- `formats` (array, optional): Output formats - `["markdown"]`, `["html"]`, `["text"]`, `["json"]`, `["screenshot"]`
45- `timeout` (number, optional): Timeout in milliseconds (default: 30000)
46- `wait_for` (number, optional): Delay before extraction in ms (browser engines only)
47- `wait_for_selector` (string/object/array, optional): Wait for CSS selectors
48- `include_tags` (array, optional): Include only these HTML tags (e.g., `["h1", "p", "article"]`)
49- `exclude_tags` (array, optional): Exclude these HTML tags
50- `proxy` (string, optional): Proxy URL (e.g., `"http://proxy:port"`)
51- `json_options` (object, optional): JSON extraction with schema/prompt
52- `extract_source` (string, optional): `"markdown"` (default) or `"html"`
53
54**Examples:**
55
56```javascript
57// Basic scrape with default cheerio
58anycrawl_scrape({ url: "https://example.com" })
59
60// Scrape SPA with Playwright
61anycrawl_scrape({
62 url: "https://spa-example.com",
63 engine: "playwright",
64 formats: ["markdown", "screenshot"]
65})
66
67// Extract structured JSON
68anycrawl_scrape({
69 url: "https://product-page.com",
70 engine: "cheerio",
71 json_options: {
72 schema: {
73 type: "object",
74 properties: {
75 product_name: { type: "string" },
76 price: { type: "number" },
77 description: { type: "string" }
78 },
79 required: ["product_name", "price"]
80 },
81 user_prompt: "Extract product details from this page"
82 }
83})
84```
85
86### 2. anycrawl_search
87
88Search Google and return structured results.
89
90**Parameters:**
91- `query` (string, required): Search query
92- `engine` (string, optional): Search engine - `"google"` (default)
93- `limit` (number, optional): Max results per page (default: 10)
94- `offset` (number, optional): Number of results to skip (default: 0)
95- `pages` (number, optional): Number of pages to retrieve (default: 1, max: 20)
96- `lang` (string, optional): Language locale (e.g., `"en"`, `"zh"`, `"vi"`)
97- `safe_search` (number, optional): 0 (off), 1 (medium), 2 (high)
98- `scrape_options` (object, optional): Scrape each result URL with these options
99
100**Examples:**
101
102```javascript
103// Basic search
104anycrawl_search({ query: "OpenAI ChatGPT" })
105
106// Multi-page search in Vietnamese
107anycrawl_search({
108 query: "hướng dẫn Node.js",
109 pages: 3,
110 lang: "vi"
111})
112
113// Search and auto-scrape results
114anycrawl_search({
115 query: "best AI tools 2026",
116 limit: 5,
117 scrape_options: {
118 engine: "cheerio",
119 formats: ["markdown"]
120 }
121})
122```
123
124### 3. anycrawl_crawl_start
125
126Start crawling an entire website (async job).
127
128**Parameters:**
129- `url` (string, required): Seed URL to start crawling
130- `engine` (string, optional): `"cheerio"` (default), `"playwright"`, `"puppeteer"`
131- `strategy` (string, optional): `"all"`, `"same-domain"` (default), `"same-hostname"`, `"same-origin"`
132- `max_depth` (number, optional): Max depth from seed URL (default: 10)
133- `limit` (number, optional): Max pages to crawl (default: 100)
134- `include_paths` (array, optional): Path patterns to include (e.g., `["/blog/*"]`)
135- `exclude_paths` (array, optional): Path patterns to exclude (e.g., `["/admin/*"]`)
136- `scrape_paths` (array, optional): Only scrape URLs matching these patterns
137- `scrape_options` (object, optional): Per-page scrape options
138
139**Examples:**
140
141```javascript
142// Crawl entire website
143anycrawl_crawl_start({
144 url: "https://docs.example.com",
145 engine: "cheerio",
146 max_depth: 5,
147 limit: 50
148})
149
150// Crawl only blog posts
151anycrawl_crawl_start({
152 url: "https://example.com",
153 strategy: "same-domain",
154 include_paths: ["/blog/*"],
155 exclude_paths: ["/blog/tags/*"],
156 scrape_options: {
157 formats: ["markdown"]
158 }
159})
160
161// Crawl product pages only
162anycrawl_crawl_start({
163 url: "https://shop.example.com",
164 strategy: "same-domain",
165 scrape_paths: ["/products/*"],
166 limit: 200
167})
168```
169
170### 4. anycrawl_crawl_status
171
172Check crawl job status.
173
174**Parameters:**
175- `job_id` (string, required): Crawl job ID
176
177**Example:**
178```javascript
179anycrawl_crawl_status({ job_id: "7a2e165d-8f81-4be6-9ef7-23222330a396" })
180```
181
182### 5. anycrawl_crawl_results
183
184Get crawl results (paginated).
185
186**Parameters:**
187- `job_id` (string, required): Crawl job ID
188- `skip` (number, optional): Number of results to skip (default: 0)
189
190**Example:**
191```javascript
192// Get first 100 results
193anycrawl_crawl_results({ job_id: "xxx", skip: 0 })
194
195// Get next 100 results
196anycrawl_crawl_results({ job_id: "xxx", skip: 100 })
197```
198
199### 6. anycrawl_crawl_cancel
200
201Cancel a running crawl job.
202
203**Parameters:**
204- `job_id` (string, required): Crawl job ID
205
206### 7. anycrawl_search_and_scrape
207
208Quick helper: Search Google then scrape top results.
209
210**Parameters:**
211- `query` (string, required): Search query
212- `max_results` (number, optional): Max results to scrape (default: 3)
213- `scrape_engine` (string, optional): Engine for scraping (default: `"cheerio"`)
214- `formats` (array, optional): Output formats (default: `["markdown"]`)
215- `lang` (string, optional): Search language
216
217**Example:**
218```javascript
219anycrawl_search_and_scrape({
220 query: "latest AI news",
221 max_results: 5,
222 formats: ["markdown"]
223})
224```
225
226## Engine Selection Guide
227
228| Engine | Best For | Speed | JS Rendering |
229|--------|----------|-------|--------------|
230| `cheerio` | Static HTML, news, blogs | ⚡ Fastest | ❌ No |
231| `playwright` | SPAs, complex web apps | 🐢 Slower | ✅ Yes |
232| `puppeteer` | Chrome-specific, metrics | 🐢 Slower | ✅ Yes |
233
234## Response Format
235
236All responses follow this structure:
237
238```json
239{
240 "success": true,
241 "data": { ... },
242 "message": "Optional message"
243}
244```
245
246Error response:
247```json
248{
249 "success": false,
250 "error": "Error type",
251 "message": "Human-readable message"
252}
253```
254
255## Common Error Codes
256
257- `400` - Bad Request (validation errors)
258- `401` - Unauthorized (invalid API key)
259- `402` - Payment Required (insufficient credits)
260- `404` - Not Found
261- `429` - Rate limit exceeded
262- `500` - Internal server error
263
264## API Limits
265
266- Rate limits apply based on your plan
267- Crawl jobs expire after 24 hours
268- Max crawl limit: depends on credits
269
270## Links
271
272- API Docs: https://docs.anycrawl.dev
273- Website: https://anycrawl.dev
274- Playground: https://anycrawl.dev/playground