curl -X POST https://api.scrapio.dev/v1/fetch \
-H "Authorization: Bearer $SCRAPIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","output":["markdown"]}'import os, requests
resp = requests.post(
"https://api.scrapio.dev/v1/fetch",
headers={"Authorization": f"Bearer {os.environ['SCRAPIO_API_KEY']}"},
json={"url": "https://example.com", "output": ["markdown"]},
)
print(resp.json()["outputs"]["markdown"])const resp = await fetch("https://api.scrapio.dev/v1/fetch", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SCRAPIO_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com", output: ["markdown"] }),
});
const data = await resp.json();
console.log(data.outputs.markdown);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapio.dev/v1/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com',
'output' => [
'markdown'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scrapio.dev/v1/fetch"
payload := strings.NewReader("{\n \"url\": \"https://example.com\",\n \"output\": [\n \"markdown\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.scrapio.dev/v1/fetch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com\",\n \"output\": [\n \"markdown\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapio.dev/v1/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com\",\n \"output\": [\n \"markdown\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"mode": "inline",
"status": "completed",
"outputs": {
"html": "<string>",
"markdown": "<string>",
"json": {},
"screenshot": {
"url": "<string>"
}
},
"usage": {
"credits": 4503599627370495,
"base": 4503599627370495,
"surcharge": 4503599627370495,
"tier": "standard"
},
"diagnostics": {
"outcome": "partial",
"output_failures": [
{
"output": "html",
"code": "<string>",
"message": "<string>"
}
]
},
"session": {
"id": "<string>",
"updated": true
},
"extraction_engine": "llm"
}{
"request_id": "<string>",
"mode": "async",
"status": "queued",
"job_id": "<string>"
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}Fetch
Fetch and render a single URL. Returns HTML, Markdown, JSON, or a screenshot.
curl -X POST https://api.scrapio.dev/v1/fetch \
-H "Authorization: Bearer $SCRAPIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","output":["markdown"]}'import os, requests
resp = requests.post(
"https://api.scrapio.dev/v1/fetch",
headers={"Authorization": f"Bearer {os.environ['SCRAPIO_API_KEY']}"},
json={"url": "https://example.com", "output": ["markdown"]},
)
print(resp.json()["outputs"]["markdown"])const resp = await fetch("https://api.scrapio.dev/v1/fetch", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SCRAPIO_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com", output: ["markdown"] }),
});
const data = await resp.json();
console.log(data.outputs.markdown);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapio.dev/v1/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com',
'output' => [
'markdown'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scrapio.dev/v1/fetch"
payload := strings.NewReader("{\n \"url\": \"https://example.com\",\n \"output\": [\n \"markdown\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.scrapio.dev/v1/fetch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com\",\n \"output\": [\n \"markdown\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapio.dev/v1/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com\",\n \"output\": [\n \"markdown\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"mode": "inline",
"status": "completed",
"outputs": {
"html": "<string>",
"markdown": "<string>",
"json": {},
"screenshot": {
"url": "<string>"
}
},
"usage": {
"credits": 4503599627370495,
"base": 4503599627370495,
"surcharge": 4503599627370495,
"tier": "standard"
},
"diagnostics": {
"outcome": "partial",
"output_failures": [
{
"output": "html",
"code": "<string>",
"message": "<string>"
}
]
},
"session": {
"id": "<string>",
"updated": true
},
"extraction_engine": "llm"
}{
"request_id": "<string>",
"mode": "async",
"status": "queued",
"job_id": "<string>"
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"diagnostics": {
"outcome": "failed",
"retryable": true,
"blocked": true,
"timed_out": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Target page URL to fetch
Whether to render JavaScript before capturing output
Device profile to emulate
desktop, mobile, tablet Reuse an existing browser session by id
Show child attributes
Show child attributes
Which output formats to return (default ["html"])
1Which output formats to return
html, markdown, json, screenshot Structured extraction config, requires json output
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Condition to wait on before capturing
Show child attributes
Show child attributes
Max time to wait for each access attempt, in ms. Defaults to 10000, or 20000 with proxy: "stealth". A value above your plan's inline limit runs the request as an async job.
x <= 300000Proxy and escalation mode. "basic": no proxy at all (cheapest; if the target blocks it the request fails and tells you to use "auto"). "stealth": go straight to the strongest tier, a hardened browser behind a residential proxy (paid plans). "auto": try cheap steps first and escalate to a residential proxy only when needed, billed by the step that served the request (paid plans, the default). The Free plan is always "basic".
basic, stealth, auto Deprecated: use proxy: "stealth". Skip the cheap tiers and go straight to the strongest (proxy/Camoufox) access tier. Requires a paid plan.
Response
Inline fetch completed successfully.
inline completed, partial Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Extraction engine to use
llm, heuristic