cURL
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
}
}API Reference
Fetch
Fetch and render a single URL. Returns HTML, Markdown, JSON, or a screenshot.
POST
/
v1
/
fetch
cURL
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
Body
application/json
Proxy 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".
Available options:
basic, stealth, auto Response
Inline fetch completed successfully.