This skill is the default XCrawl entry point when the user asks for XCrawl directly without naming a specific API or sub-skill. It currently targets single-page extraction through XCrawl Scrape APIs. Default behavior is raw passthrough: return upstream API response bodies as-is.
Before using this skill, the user must create a local config file and write XCRAWL_API_KEY into it.
Path: ~/.xcrawl/config.json
json
{
"XCRAWL_API_KEY": "<your_api_key>"
}
Read API key from local config file only. Do not require global environment variables.
Using XCrawl APIs consumes credits.
If the user does not have an account or available credits, guide them to register at https://dash.xcrawl.com/.
After registration, they can activate the free 1000 credits plan before running requests.
Request runtime permissions for curl and node only.
Do not request Python, shell helper scripts, or other runtime permissions.
POST /v1/scrapeGET /v1/scrape/{scrape_id}https://run.xcrawl.comAuthorization: Bearer <XCRAWL_API_KEY>bash
API_KEY="$(node -e "const fs=require('fs');const p=process.env.HOME+'/.xcrawl/config.json';const k=JSON.parse(fs.readFileSync(p,'utf8')).XCRAWL_API_KEY||'';process.stdout.write(k)")"
curl -sS -X POST "https://run.xcrawl.com/v1/scrape" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_KEY}" \
-d '{"url":"https://example.com","mode":"sync","output":{"formats":["markdown","links"]}}'
bash
API_KEY="$(node -e "const fs=require('fs');const p=process.env.HOME+'/.xcrawl/config.json';const k=JSON.parse(fs.readFileSync(p,'utf8')).XCRAWL_API_KEY||'';process.stdout.write(k)")"
CREATE_RESP="$(curl -sS -X POST "https://run.xcrawl.com/v1/scrape" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_KEY}" \
-d '{"url":"https://example.com/product/1","mode":"async","output":{"formats":["json"]},"json":{"prompt":"Extract title and price."}}')"
echo "$CREATE_RESP"
SCRAPE_ID="$(node -e 'const s=process.argv[1];const j=JSON.parse(s);process.stdout.write(j.scrape_id||"")' "$CREATE_RESP")"
curl -sS -X GET "https://run.xcrawl.com/v1/scrape/${SCRAPE_ID}" \
-H "Authorization: Bearer ${API_KEY}"
bash
node -e '
const fs=require("fs");
const apiKey=JSON.parse(fs.readFileSync(process.env.HOME+"/.xcrawl/config.json","utf8")).XCRAWL_API_KEY;
const body={url:"https://example.com",mode:"sync",output:{formats:["markdown","json"]},json:{prompt:"Extract title and publish date."}};
fetch("https://run.xcrawl.com/v1/scrape",{
method:"POST",
headers:{"Content-Type":"application/json",Authorization:`Bearer ${apiKey}`},
body:JSON.stringify(body)
}).then(async r=>{console.log(await r.text());});
'
POST https://run.xcrawl.com/v1/scrapeContent-Type: application/jsonAuthorization: Bearer <api_key>FieldTypeRequiredDefaultDescriptionurlstringYes-Target URLmodestringNosync``sync or async``proxyobjectNo-Proxy configrequestobjectNo-Request configjs_renderobjectNo-JS rendering configoutputobjectNo-Output configwebhookobjectNo-Async webhook config ( mode=async)
proxy#FieldTypeRequiredDefaultDescriptionlocationstringNoUSISO-3166-1 alpha-2 country code, e.g. US / JP / SG``sticky_sessionstringNoAuto-generatedSticky session ID; same ID attempts to reuse exit
request#FieldTypeRequiredDefaultDescriptionlocalestringNoen-US,en;q=0.9Affects Accept-Language``devicestringNodesktop``desktop / mobile; affects UA and viewportcookiesobject mapNo-Cookie key/value pairsheadersobject mapNo-Header key/value pairsonly_main_contentbooleanNotrueReturn main content onlyblock_adsbooleanNotrueAttempt to block ad resourcesskip_tls_verificationbooleanNotrueSkip TLS verification
js_render#FieldTypeRequiredDefaultDescriptionenabledbooleanNotrueEnable browser renderingwait_untilstringNoload``load / domcontentloaded / networkidle``viewport.widthintegerNo-Viewport width (desktop 1920, mobile 402)viewport.heightintegerNo-Viewport height (desktop 1080, mobile 874)
output#FieldTypeRequiredDefaultDescriptionformatsstring[]No["markdown"]Output formatsscreenshotstringNoviewport``full_page / viewport (only if formats includes screenshot)json.promptstringNo-Extraction promptjson.json_schemaobjectNo-JSON Schema
output.formats enum:
htmlraw_htmlmarkdownlinkssummaryscreenshotjsonwebhook#FieldTypeRequiredDefaultDescriptionurlstringNo-Callback URLheadersobject mapNo-Custom callback headerseventsstring[]No["started","completed","failed"]Events: started / completed / failed
mode=sync)#FieldTypeDescriptionscrape_idstringTask IDendpointstringAlways scrape``versionstringVersionstatusstringcompleted / failed``urlstringTarget URLdataobjectResult datastarted_atstringStart time (ISO 8601)ended_atstringEnd time (ISO 8601)total_credits_usedintegerTotal credits used
data fields (based on output.formats):
html, raw_html, markdown, links, summary, screenshot, jsonmetadata (page metadata)traffic_bytescredits_usedcredits_detailcredits_detail fields:
FieldTypeDescriptionbase_costintegerBase scrape costtraffic_costintegerTraffic costjson_extract_costintegerJSON extraction cost
mode=async)#FieldTypeDescriptionscrape_idstringTask IDendpointstringAlways scrape``versionstringVersionstatusstringAlways pending
GET /v1/scrape/{scrape_id})#FieldTypeDescriptionscrape_idstringTask IDendpointstringAlways scrape``versionstringVersionstatusstringpending / crawling / completed / failed``urlstringTarget URLdataobjectSame shape as sync data``started_atstringStart time (ISO 8601)ended_atstringEnd time (ISO 8601)
output.formats.scrape_id, status, and timestamps.completed or failed.Return:
sync or async)request_payload used for the requestDo not generate summaries unless the user explicitly requests a summary.