Install
openclaw skills install webcrawlerScrape a single page or crawl a full website using WebCrawlerAPI. Trigger for: fetching page content, getting markdown from a URL, scraping a page, crawling a website/domain, websearch, webfetch.
openclaw skills install webcrawlerUse WebCrawlerAPI to get page content as markdown (single page scrape) or crawl entire websites (multi-page).
The API key must be set as an environment variable before running any curl commands:
export WEBCRAWLERAPI_API_KEY="your_api_key"
Get your key:
If WEBCRAWLERAPI_API_KEY is not set, stop and ask the user to set it before proceeding.
Scrape (single page) — default when user asks for:
Crawl (multi-page) — when user asks for:
Use POST /v2/scrape. Synchronous — result is returned immediately.
curl --fail --silent --show-error \
--request POST \
--url "https://api.webcrawlerapi.com/v2/scrape" \
--header "Authorization: Bearer ${WEBCRAWLERAPI_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"url": "<URL>",
"output_formats": ["markdown"]
}'
The response contains markdown field directly — no polling needed:
{
"success": true,
"status": "done",
"markdown": "## Page Title\n\nPage content...",
"page_status_code": 200,
"page_title": "Page Title"
}
Output the markdown content directly to the user. No need to save to files for scrape.
If success is false, show the error_code and error_message to the user.
Use POST /v1/crawl. Asynchronous — returns a job ID, then poll for results.
curl --fail --silent --show-error \
--request POST \
--url "https://api.webcrawlerapi.com/v1/crawl" \
--header "Authorization: Bearer ${WEBCRAWLERAPI_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"url": "<URL>",
"items_limit": 25,
"output_formats": ["markdown"]
}'
Response:
{ "id": "<JOB_ID>" }
Use a background Bash job to poll every 10 seconds until status is done or error:
JOB_ID="<JOB_ID>"
while true; do
RESULT=$(curl --fail --silent --show-error \
--request GET \
--url "https://api.webcrawlerapi.com/v1/job/${JOB_ID}" \
--header "Authorization: Bearer ${WEBCRAWLERAPI_API_KEY}")
STATUS=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")
echo "Job status: $STATUS"
if [ "$STATUS" = "done" ] || [ "$STATUS" = "error" ]; then
echo "$RESULT"
break
fi
sleep 10
done
When job is done, for each job_item with status: done:
markdown_content_url.webcrawlerapi/<hostname>/<sanitized-path>.mdmkdir -p ".webcrawlerapi/<hostname>"
# For each job_item, fetch markdown_content_url and save:
curl --silent "<markdown_content_url>" \
--output ".webcrawlerapi/<hostname>/<sanitized-filename>.md"
Sanitize filenames: replace ://, /, ?, #, : with _. Trim leading underscores.
After saving, tell the user:
.webcrawlerapi/<hostname>/items_limit for crawl: 25 (ask user if they want more).webcrawlerapi/ directory in current working direrror status, show last_error from job items and the job-level error if present${WEBCRAWLERAPI_API_KEY}