@acedatacloud/skills 2026.629.2 → 2026.629.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/webextrator/SKILL.md +139 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acedatacloud/skills",
|
|
3
|
-
"version": "2026.629.
|
|
3
|
+
"version": "2026.629.3",
|
|
4
4
|
"description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webextrator
|
|
3
|
+
description: Render and extract web page content via AceDataCloud's WebExtrator API. Use when scraping a page's final rendered HTML, or extracting typed structured data (Article, Product, Recipe, Video, Discussion, Job) plus clean markdown/text from any URL. Real headless Chromium with schema.org + LLM extraction.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: acedatacloud
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Requires ACEDATACLOUD_API_TOKEN in .env file (see _shared/authentication.md). Optionally pair with mcp-webextrator for tool-use.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# WebExtrator Web Render & Extract
|
|
12
|
+
|
|
13
|
+
Render and extract web content through AceDataCloud's WebExtrator API — real headless Chromium plus a three-tier extraction pipeline (schema.org JSON-LD mapper → LLM typed extractor → Readability/markdown fallback).
|
|
14
|
+
|
|
15
|
+
> **Setup:** See [authentication](../_shared/authentication.md) for token setup.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
curl -X POST https://api.acedata.cloud/webextrator/extract \
|
|
21
|
+
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
|
|
22
|
+
-H "Content-Type: application/json" \
|
|
23
|
+
-d '{"url": "https://example.com", "expected_type": "general"}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Returns synchronously in seconds — no task polling needed.
|
|
27
|
+
|
|
28
|
+
## Endpoints
|
|
29
|
+
|
|
30
|
+
| Path | Purpose |
|
|
31
|
+
|------|---------|
|
|
32
|
+
| `POST /webextrator/render` | Headless Chromium render → raw HTML + clean text + title |
|
|
33
|
+
| `POST /webextrator/extract` | Render + structured extraction (schema.org + LLM types) + markdown |
|
|
34
|
+
| `POST /webextrator/tasks` | Look up historical render/extract task envelopes (7-day retention, free) |
|
|
35
|
+
|
|
36
|
+
## Workflows
|
|
37
|
+
|
|
38
|
+
### 1. Extract typed content
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
POST /webextrator/extract
|
|
42
|
+
{
|
|
43
|
+
"url": "https://example.com",
|
|
44
|
+
"expected_type": "general"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Real response (trimmed):
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"success": true,
|
|
53
|
+
"task_id": "604b1cfb-6c5a-42c9-b900-a281e1b9c3c5",
|
|
54
|
+
"trace_id": "f2a7c0b0-c17c-4bc9-b6e7-9c59746dd366",
|
|
55
|
+
"elapsed": 0.003,
|
|
56
|
+
"data": {
|
|
57
|
+
"kind": "extract",
|
|
58
|
+
"url": "https://example.com",
|
|
59
|
+
"finalUrl": "https://example.com/",
|
|
60
|
+
"contentType": "general",
|
|
61
|
+
"title": "Example Domain",
|
|
62
|
+
"description": "This domain is for use in documentation examples without needing permission. Avoid use in operations.",
|
|
63
|
+
"language": "en",
|
|
64
|
+
"images": [],
|
|
65
|
+
"links": [],
|
|
66
|
+
"markdown": "...",
|
|
67
|
+
"text": "...",
|
|
68
|
+
"structured": { "schemaOrg": {}, "openGraph": {}, "jsonLd": [] }
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 2. Render raw HTML
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
POST /webextrator/render
|
|
77
|
+
{
|
|
78
|
+
"url": "https://example.com",
|
|
79
|
+
"wait_until": "networkidle",
|
|
80
|
+
"block_resources": ["image", "media", "font"]
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Returns `data.html`, `data.text`, `data.title`, `data.status`, `data.finalUrl`.
|
|
85
|
+
|
|
86
|
+
### 3. Look up a task
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
POST /webextrator/tasks
|
|
90
|
+
{
|
|
91
|
+
"action": "retrieve",
|
|
92
|
+
"id": "604b1cfb-6c5a-42c9-b900-a281e1b9c3c5"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Parameters
|
|
97
|
+
|
|
98
|
+
### Render & Extract (shared)
|
|
99
|
+
|
|
100
|
+
| Parameter | Required | Description |
|
|
101
|
+
|-----------|----------|-------------|
|
|
102
|
+
| `url` | Yes | Page URL to render (`http(s)://`) |
|
|
103
|
+
| `wait_until` | No | `load` / `domcontentloaded` / `networkidle` / `commit` (default `networkidle`) |
|
|
104
|
+
| `timeout` | No | Navigation timeout in seconds (default 30) |
|
|
105
|
+
| `delay` | No | Extra wait in seconds after `wait_until` (for SPAs) |
|
|
106
|
+
| `wait_for_selector` | No | CSS selector to wait for before ready |
|
|
107
|
+
| `block_resources` | No | Drop `image`/`font`/`media`/`stylesheet`/`xhr`/`fetch` |
|
|
108
|
+
| `headers` | No | Extra request headers for the target site |
|
|
109
|
+
| `cookies` | No | Cookies to install before navigation |
|
|
110
|
+
| `mode` | No | `sync` (default) or `async` (returns job id) |
|
|
111
|
+
| `callback_url` | No | Posted the final envelope when `mode=async` |
|
|
112
|
+
| `bypass_cache` | No | Skip the Redis result cache for this request |
|
|
113
|
+
| `cache_ttl_seconds` | No | Override cache TTL; `0` disables caching |
|
|
114
|
+
|
|
115
|
+
### Extract-only
|
|
116
|
+
|
|
117
|
+
| Parameter | Required | Description |
|
|
118
|
+
|-----------|----------|-------------|
|
|
119
|
+
| `expected_type` | No | `product` / `article` / `general` — skips the heuristic |
|
|
120
|
+
| `enable_llm` | No | Allow LLM extractor when schema.org found nothing (default false) |
|
|
121
|
+
|
|
122
|
+
### Tasks
|
|
123
|
+
|
|
124
|
+
| Parameter | Required | Description |
|
|
125
|
+
|-----------|----------|-------------|
|
|
126
|
+
| `action` | Yes | `retrieve` (single) or `retrieve_batch` (many) |
|
|
127
|
+
| `id` / `trace_id` | one of | For `retrieve` |
|
|
128
|
+
| `ids` / `trace_ids` | one of | For `retrieve_batch` |
|
|
129
|
+
|
|
130
|
+
## Gotchas
|
|
131
|
+
|
|
132
|
+
- Parameters use **snake_case** (`wait_until`, `block_resources`), not camelCase
|
|
133
|
+
- Cache hits are still billed; identical URLs return in ~0.003s
|
|
134
|
+
- `expected_type` only allows `product`/`article`/`general` — typed kinds (recipe/video/job) are detected automatically from schema.org
|
|
135
|
+
- `enable_llm` has no effect when the page ships schema.org JSON-LD — the deterministic mapper wins for free
|
|
136
|
+
- Tasks API is free and retains records for 7 days only
|
|
137
|
+
- `cache_ttl_seconds: 0` means "do not cache" — use `bypass_cache` to skip read
|
|
138
|
+
|
|
139
|
+
> **MCP:** `pip install mcp-webextrator` | Hosted: `https://webextrator.mcp.acedata.cloud/mcp` | See [all MCP servers](../_shared/mcp-servers.md)
|