[{"data":1,"prerenderedAt":309},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fquick-start":3},{"id":4,"title":5,"body":6,"description":301,"extension":302,"icon":303,"meta":304,"navigation":247,"order":43,"path":305,"seo":306,"stem":307,"__hash__":308},"docs\u002Fdocs\u002Fquick-start.md","Quick start",{"type":7,"value":8,"toc":295},"minimark",[9,14,18,49,56,60,63,101,108,112,115,270,273,277,291],[10,11,13],"h2",{"id":12},"_1-inspect-the-public-contract","1. Inspect the public contract",[15,16,17],"p",{},"No authentication is needed to inspect the service:",[19,20,25],"pre",{"className":21,"code":22,"language":23,"meta":24,"style":24},"language-bash shiki shiki-themes github-light github-dark","curl https:\u002F\u002Ftest.x402labs.sh\u002Fv1\u002Fpricing\ncurl https:\u002F\u002Ftest.x402labs.sh\u002Fopenapi.json\n","bash","",[26,27,28,41],"code",{"__ignoreMap":24},[29,30,33,37],"span",{"class":31,"line":32},"line",1,[29,34,36],{"class":35},"sScJk","curl",[29,38,40],{"class":39},"sZZnC"," https:\u002F\u002Ftest.x402labs.sh\u002Fv1\u002Fpricing\n",[29,42,44,46],{"class":31,"line":43},2,[29,45,36],{"class":35},[29,47,48],{"class":39}," https:\u002F\u002Ftest.x402labs.sh\u002Fopenapi.json\n",[15,50,51,52,55],{},"Pricing is dynamic. Read ",[26,53,54],{},"\u002Fv1\u002Fpricing"," before enforcing a maximum payment in your client.",[10,57,59],{"id":58},"_2-send-the-request","2. Send the request",[15,61,62],{},"An unsigned request demonstrates the normal HTTP negotiation:",[19,64,66],{"className":21,"code":65,"language":23,"meta":24,"style":24},"curl -i https:\u002F\u002Ftest.x402labs.sh\u002Fv1\u002Fscraping\u002Fscrape \\\n  -H 'content-type: application\u002Fjson' \\\n  --data '{\"url\":\"https:\u002F\u002Fexample.com\",\"formats\":[\"markdown\"],\"onlyMainContent\":true}'\n",[26,67,68,82,92],{"__ignoreMap":24},[29,69,70,72,76,79],{"class":31,"line":32},[29,71,36],{"class":35},[29,73,75],{"class":74},"sj4cs"," -i",[29,77,78],{"class":39}," https:\u002F\u002Ftest.x402labs.sh\u002Fv1\u002Fscraping\u002Fscrape",[29,80,81],{"class":74}," \\\n",[29,83,84,87,90],{"class":31,"line":43},[29,85,86],{"class":74},"  -H",[29,88,89],{"class":39}," 'content-type: application\u002Fjson'",[29,91,81],{"class":74},[29,93,95,98],{"class":31,"line":94},3,[29,96,97],{"class":74},"  --data",[29,99,100],{"class":39}," '{\"url\":\"https:\u002F\u002Fexample.com\",\"formats\":[\"markdown\"],\"onlyMainContent\":true}'\n",[15,102,103,104,107],{},"When payments are enabled, the API answers with ",[26,105,106],{},"402 Payment Required"," and a machine-readable\npayment challenge. A compatible x402 client signs that challenge and repeats the request.",[10,109,111],{"id":110},"_3-use-an-x402-client","3. Use an x402 client",[15,113,114],{},"Configure your wallet in the client runtime, never in browser code or committed configuration. The\nclient performs the challenge, payment, and retry sequence while your application handles the final\nJSON response.",[19,116,120],{"className":117,"code":118,"language":119,"meta":24,"style":24},"language-ts shiki shiki-themes github-light github-dark","const response = await paidFetch('https:\u002F\u002Ftest.x402labs.sh\u002Fv1\u002Fscraping\u002Fscrape', {\n  method: 'POST',\n  headers: { 'content-type': 'application\u002Fjson' },\n  body: JSON.stringify({\n    url: 'https:\u002F\u002Fexample.com',\n    formats: ['markdown'],\n    onlyMainContent: true,\n  }),\n});\n\nconst result = await response.json();\n","ts",[26,121,122,150,161,178,196,207,219,230,236,242,249],{"__ignoreMap":24},[29,123,124,128,131,134,137,140,144,147],{"class":31,"line":32},[29,125,127],{"class":126},"szBVR","const",[29,129,130],{"class":74}," response",[29,132,133],{"class":126}," =",[29,135,136],{"class":126}," await",[29,138,139],{"class":35}," paidFetch",[29,141,143],{"class":142},"sVt8B","(",[29,145,146],{"class":39},"'https:\u002F\u002Ftest.x402labs.sh\u002Fv1\u002Fscraping\u002Fscrape'",[29,148,149],{"class":142},", {\n",[29,151,152,155,158],{"class":31,"line":43},[29,153,154],{"class":142},"  method: ",[29,156,157],{"class":39},"'POST'",[29,159,160],{"class":142},",\n",[29,162,163,166,169,172,175],{"class":31,"line":94},[29,164,165],{"class":142},"  headers: { ",[29,167,168],{"class":39},"'content-type'",[29,170,171],{"class":142},": ",[29,173,174],{"class":39},"'application\u002Fjson'",[29,176,177],{"class":142}," },\n",[29,179,181,184,187,190,193],{"class":31,"line":180},4,[29,182,183],{"class":142},"  body: ",[29,185,186],{"class":74},"JSON",[29,188,189],{"class":142},".",[29,191,192],{"class":35},"stringify",[29,194,195],{"class":142},"({\n",[29,197,199,202,205],{"class":31,"line":198},5,[29,200,201],{"class":142},"    url: ",[29,203,204],{"class":39},"'https:\u002F\u002Fexample.com'",[29,206,160],{"class":142},[29,208,210,213,216],{"class":31,"line":209},6,[29,211,212],{"class":142},"    formats: [",[29,214,215],{"class":39},"'markdown'",[29,217,218],{"class":142},"],\n",[29,220,222,225,228],{"class":31,"line":221},7,[29,223,224],{"class":142},"    onlyMainContent: ",[29,226,227],{"class":74},"true",[29,229,160],{"class":142},[29,231,233],{"class":31,"line":232},8,[29,234,235],{"class":142},"  }),\n",[29,237,239],{"class":31,"line":238},9,[29,240,241],{"class":142},"});\n",[29,243,245],{"class":31,"line":244},10,[29,246,248],{"emptyLinePlaceholder":247},true,"\n",[29,250,252,254,257,259,261,264,267],{"class":31,"line":251},11,[29,253,127],{"class":126},[29,255,256],{"class":74}," result",[29,258,133],{"class":126},[29,260,136],{"class":126},[29,262,263],{"class":142}," response.",[29,265,266],{"class":35},"json",[29,268,269],{"class":142},"();\n",[15,271,272],{},"The exact wrapper API depends on your x402 client version. Consult that client's documentation for\nwallet construction and network support.",[10,274,276],{"id":275},"next-steps","Next steps",[15,278,279,280,285,286,290],{},"Read ",[281,282,284],"a",{"href":283},"\u002Fdocs\u002Fpayments","x402 payments"," for the protocol flow or ",[281,287,289],{"href":288},"\u002Fdocs\u002Fscraping","scraping"," to choose\nthe right endpoint.",[292,293,294],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":24,"searchDepth":43,"depth":43,"links":296},[297,298,299,300],{"id":12,"depth":43,"text":13},{"id":58,"depth":43,"text":59},{"id":110,"depth":43,"text":111},{"id":275,"depth":43,"text":276},"Discover pricing and make your first x402-protected scraping request.","md","lucide:zap",{},"\u002Fdocs\u002Fquick-start",{"title":5,"description":301},"docs\u002Fquick-start","ud99_MP-KznJ9QhqViG6og1LfQeAq8qbe7cbPPPa5TU",1787093955738]