Install
openclaw skills install felo-web-extractExtract web page content from a URL using Felo Web Extract API. Use when users ask to scrape/capture/fetch webpage content, extract article text from URL, co...
openclaw skills install felo-web-extractTrigger this skill when the user wants to:
Trigger keywords (examples):
/felo-web-extract, "use felo web extract"Do NOT use for:
felo-search)felo-slides)Linux/macOS:
export FELO_API_KEY="your-api-key-here"
Windows PowerShell:
$env:FELO_API_KEY="your-api-key-here"
Script (from repo):
node felo-web-extract/scripts/run_web_extract.mjs --url "https://example.com/article" [options]
Packaged CLI (after npm install -g felo-ai): same options, with short forms allowed:
felo web-extract -u "https://example.com" [options]
# Short forms: -u (url), -f (format), -t (timeout, seconds), -j (json)
Options:
| Option | Default | Description |
|---|---|---|
--url | (required) | Webpage URL to extract |
--format | markdown | Output format: html, text, markdown |
--target-selector | - | CSS selector: extract only this element (e.g. article.main, #content) |
--wait-for-selector | - | Wait for this selector before extracting (e.g. dynamic content) |
--readability | false | Enable readability processing (main content only) |
--crawl-mode | fast | fast or fine |
--timeout | 60000 (script) / 60 (CLI) | Request timeout: script uses milliseconds, CLI uses seconds (e.g. -t 90) |
--json / -j | false | Print full API response as JSON |
When the user wants a specific part of the page or a specific output format, phrase the command like this:
--format text, --format markdown, or --format html.#main" / "Extract only article.main-content" → use --target-selector "article.main" or the selector they give (e.g. #main, .main-content, article .post).Examples of user intents and equivalent commands:
| User intent | Command |
|---|---|
| "Extract this page as plain text" | --url "..." --format text |
| "Get only the main content area" | --url "..." --target-selector "main" or article |
| "Extract the div with id=content as markdown" | --url "..." --target-selector "#content" --format markdown |
| "Just the article body, as HTML" | --url "..." --target-selector "article .body" --format html |
Examples:
# Basic: extract as Markdown
node felo-web-extract/scripts/run_web_extract.mjs --url "https://example.com"
# Article-style with readability
node felo-web-extract/scripts/run_web_extract.mjs --url "https://example.com/article" --readability --format markdown
# Raw HTML
node felo-web-extract/scripts/run_web_extract.mjs --url "https://example.com" --format html --json
# Only the element matching a CSS selector (e.g. main article)
node felo-web-extract/scripts/run_web_extract.mjs --url "https://example.com" --target-selector "article.main" --format markdown
# Specific output format + target selector
node felo-web-extract/scripts/run_web_extract.mjs --url "https://example.com" --target-selector "#content" --format text
curl -X POST "https://openapi.felo.ai/v2/web/extract" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "output_format": "markdown", "with_readability": true}'
POST /v2/web/extracthttps://openapi.felo.ai. Override with FELO_API_BASE env if needed.Authorization: Bearer YOUR_API_KEY| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | Yes | - | Webpage URL to extract |
| crawl_mode | string | No | fast | fast or fine |
| output_format | string | No | html | html, text, markdown |
| with_readability | boolean | No | - | Use readability (main content) |
| with_links_summary | boolean | No | - | Include links summary |
| with_images_summary | boolean | No | - | Include images summary |
| target_selector | string | No | - | CSS selector for target element |
| wait_for_selector | string | No | - | Wait for selector before extract |
| timeout | integer | No | - | Timeout in milliseconds |
| with_cache | boolean | No | true | Use cache |
Success (200):
{
"code": 0,
"message": "success",
"data": {
"content": { ... }
}
}
Extracted content is in data.content; structure depends on output_format.
| HTTP | Code | Description |
|---|---|---|
| 400 | - | Parameter validation failed |
| 401 | INVALID_API_KEY | API key invalid or revoked |
| 500/502 | WEB_EXTRACT_FAILED | Extract failed (server or page error) |
On success (script without --json):
With --json:
code, message, data.Error response to user:
## Web Extract Failed
- Error: <code or message>
- URL: <requested url>
- Suggestion: <e.g. check URL, retry, or use --timeout>
FELO_API_KEY before calling; if missing, return setup instructions.--timeout or timeout in request body.output_format: "markdown" and with_readability: true for clean article text.with_cache: false in body only when fresh content is required (script does not expose this by default).