Web Extract
32.5 credits per billable page or site map
ae_web_extract
提取公开网页的可读正文并发现站内链接,也可按指定深度和页数抓取多个页面。结果以 JSON 返回,可包含页面标题、最终 URL、语言、Markdown 正文、发现的链接及各抓取页面的信息。
32.5 credits per billable page or site map
Pricing
32.5 credits per billable page or site map
| Mode | Charge |
|---|---|
| Single page or site map | 32.5 credits per billable request |
| Crawl | 32.5 credits per billable page |
Single-page extraction and site mapping are charged per completed request. Crawl is charged per billable page.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
url | string | Yes | No parameter description. | — |
mode | enum (scrape | map | crawl) | No | Parameter defines the extraction mode. It can be set to: `scrape` (default) - Extract a single page. `map` - List the website's URLs from the page links and sitemaps. `crawl` - Follow links on the same website and extract every page visited. **Crawl mode consumes one search credit per successfully extracted page.** | — |
device | enum (desktop | tablet | mobile) | No | Parameter defines the device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser. | — |
timeout | number | No | Parameter defines the HTTP request timeout in milliseconds (1,000–120,000). Default: `30,000` (30 seconds). | — |
max_depth | integer | No | Used with `mode=crawl`. Parameter defines how many links deep the crawl follows from the starting page. `0` extracts only the starting page. Default: `2`. Maximum: `3`. | 2 |
max_pages | integer | No | Used with `mode=crawl`. Parameter defines the maximum number of pages to extract, including the starting page. Default: `10`. Maximum: `100`. Each successfully extracted page consumes one search credit. | 10 |
exclude_tags | string | No | Parameter defines a comma-separated list of CSS selectors to remove before parsing, e.g. `nav, footer, .ads, #cookie-banner`. | — |
include_tags | string | No | Parameter defines a comma-separated list of CSS selectors to keep, e.g. `article, main, .post-content`. Everything else inside is removed before parsing. | — |
prefetch_delay | number | No | Parameter defines a delay in milliseconds before the first page is fetched (0–10,000). Default: `0`. The Extract API doesn't run JavaScript, so this is not a rendering delay. | — |
include_sitemap | boolean | No | Used with `mode=map`. Parameter defines whether to also read the website's sitemaps, from `/sitemap.xml` and `/robots.txt`. Default: `true`. | — |
include_markdown | boolean | No | Parameter defines whether to include the page's main content as Markdown in `markdown`. Default: `true`. | — |
include_subdomains | boolean | No | Used with `mode=map` and `mode=crawl`. Parameter defines whether to include other subdomains of the same website, e.g. `blog.example.com` when starting from `www.example.com`. Default: `false` (same host only). | — |
Invocation example
Parameter templateGenerated from the parameter configuration. Replace the sample values before use.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_web_extract' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"url": "xxx"
}
}'No response example available yet.




