Configure Harness
Web Fetch API
Extract webpage content as HTML, text, or Markdown with selector and readability options.
/v2/web/extractAuthentication
Bearer API key
Content type
application/json
Rate notes
Endpoint-specific limits may apply.
The Web Fetch API extracts content from a target URL and returns the result in a format that is easier for agents, RAG systems, and content workflows to process. It can return HTML, plain text, or Markdown, and it supports selectors, readability options, cache control, custom user agents, and request cookies.
Endpoint
POST https://openapi.felo.ai/v2/web/extractAuthentication
Send your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYSee the Authentication Guide for details on creating and managing API keys.
Use with AI Agents
Install the complete felo-ai package when you want an Agent to extract webpages alongside every other available Felo Skill. The installer dynamically discovers every package directory containing SKILL.md, so it never relies on a fixed list. Install all discovered Skills in Codex ~/.codex/skills, Claude Code ~/.claude/skills, OpenClaw ~/.agents/skills, or Hermes Agent ~/.hermes/skills. Use the manual AI Agent setup guide for each platform's safe installation and API key steps.
Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Your API key in the format Bearer YOUR_API_KEY |
Content-Type | Yes | Must be application/json |
Body Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | - | The webpage URL to extract. |
crawl_mode | string | No | fast | Extraction mode. Use fast for a quicker fetch or fine for a more precise crawl that may handle richer pages. |
output_format | string | No | html | Output format. Supported values: html, text, markdown. |
with_readability | boolean or string | No | - | Enable readability processing to focus on main content and reduce page noise. |
with_links_summary | boolean | No | - | Include a summary of links when supported by the downstream extractor. |
with_images_summary | boolean | No | - | Include a summary of images when supported. |
with_images_readability | boolean | No | - | Apply readability handling to image extraction when supported. |
with_images | boolean | No | - | Include image information in the extracted result. |
with_links | boolean | No | - | Include link information in the extracted result. |
ignore_empty_text_image | boolean | No | - | Ignore images that do not contain useful text when supported. |
target_selector | string | No | - | CSS selector for the target element to extract, such as article.main-content. |
wait_for_selector | string | No | - | Wait until a CSS selector appears before extraction. Useful for dynamically rendered pages. |
set_cookies | array | No | - | Cookies to send with the extraction request. |
user_agent | string | No | - | Custom User-Agent string for the extraction request. |
timeout | integer | No | - | Request timeout in milliseconds. |
with_cache | boolean | No | true | Whether the downstream extractor may use cache. |
with_stypes | boolean | No | false | Include style-type metadata when supported. |
Response
Success Response
The response uses a transparent pass-through design. The exact fields inside data can vary based on output_format and other extraction options.
{
"status": "ok",
"message": null,
"data": {
"content": "# Example Article\n\nExtracted article content..."
}
}Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Response status. Usually ok for a successful request. |
message | string or null | Additional message. Usually null for successful requests. |
data | object | Extracted content and metadata returned by the downstream extraction service. |
data.content | string or object | Extracted content. The shape depends on output_format and selected options. |
Error Responses
| HTTP Status | Error Code | Description | Suggested Action |
|---|---|---|---|
| 400 | WEB_EXTRACT_FAILED | Request validation failed, the URL is invalid, or the downstream extractor returned a client-side error. | Check url, selectors, and request parameters. |
| 401 | INVALID_API_KEY | API key is missing, invalid, or revoked. | Verify your API key and authorization header. |
| 500 | WEB_EXTRACT_FAILED | Internal service error. | Retry the request. Contact support if the issue persists. |
Examples
Basic Extraction
curl -X POST https://openapi.felo.ai/v2/web/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com"
}'Extract Markdown With Readability
curl -X POST https://openapi.felo.ai/v2/web/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/article",
"output_format": "markdown",
"with_readability": true
}'Extract a Specific CSS Selector
curl -X POST https://openapi.felo.ai/v2/web/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/article",
"target_selector": "article.main-content",
"output_format": "text"
}'Wait for Dynamic Content
curl -X POST https://openapi.felo.ai/v2/web/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/app",
"crawl_mode": "fine",
"wait_for_selector": "#loaded-content",
"output_format": "markdown",
"timeout": 30000
}'Use Cases
- Give an agent webpage context before answering a question.
- Extract article text for RAG ingestion or knowledge-base creation.
- Convert webpages into Markdown for archiving or documentation workflows.
- Pull focused content from a page by using CSS selectors.
- Reduce page noise with readability processing before downstream AI analysis.
Notes
- The API handles one URL per request.
datais passed through from the downstream extraction service, so additional fields may appear over time.finemode may be slower thanfast, but can be useful when the page needs richer rendering behavior.- Some pages may block extraction, require cookies, or need a custom
user_agent.