mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-06-06 22:05:13 +02:00
docs: add workflow examples
This commit is contained in:
parent
b75b768ec3
commit
aab51bea91
7 changed files with 281 additions and 0 deletions
60
examples/firecrawl-compatible-api/README.md
Normal file
60
examples/firecrawl-compatible-api/README.md
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# Firecrawl-Compatible API
|
||||
|
||||
webclaw exposes Firecrawl-compatible v2 routes for teams migrating existing scrape, crawl, map, or search calls.
|
||||
|
||||
## Scrape
|
||||
|
||||
```bash
|
||||
curl https://api.webclaw.io/v2/scrape \
|
||||
-H "Authorization: Bearer $WEBCLAW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"url": "https://example.com",
|
||||
"formats": ["markdown"]
|
||||
}'
|
||||
```
|
||||
|
||||
## Crawl
|
||||
|
||||
```bash
|
||||
curl https://api.webclaw.io/v2/crawl \
|
||||
-H "Authorization: Bearer $WEBCLAW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"url": "https://docs.example.com",
|
||||
"limit": 25,
|
||||
"maxDepth": 2
|
||||
}'
|
||||
```
|
||||
|
||||
Poll the returned crawl id:
|
||||
|
||||
```bash
|
||||
curl https://api.webclaw.io/v2/crawl/$CRAWL_ID \
|
||||
-H "Authorization: Bearer $WEBCLAW_API_KEY"
|
||||
```
|
||||
|
||||
## Map
|
||||
|
||||
```bash
|
||||
curl https://api.webclaw.io/v2/map \
|
||||
-H "Authorization: Bearer $WEBCLAW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"url": "https://docs.example.com"
|
||||
}'
|
||||
```
|
||||
|
||||
## Search
|
||||
|
||||
```bash
|
||||
curl https://api.webclaw.io/v2/search \
|
||||
-H "Authorization: Bearer $WEBCLAW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"query": "site:docs.rs tokio tutorial",
|
||||
"limit": 5
|
||||
}'
|
||||
```
|
||||
|
||||
Compatibility routes are meant to reduce migration friction. For new projects, prefer the native `/v1` API because it exposes webclaw-specific options more directly.
|
||||
Loading…
Add table
Add a link
Reference in a new issue