Skip to main content
GET
Scrape raw bytes
1 Credit Decode the bytes field from base64 to recover the downloaded file. HTTP compression is decoded before base64 encoding. Downloads support up to 20 MiB (20,971,520 bytes) before base64 encoding and are not cached. HTML is returned as the original HTTP response without rendering JavaScript. For rendered page content, use Scrape HTML or Scrape Markdown. Follow Download resource bytes for cURL and SDK examples that decode and save the file. Bytes supports only timeoutOpts.behavior: "fail"; the complete download must fit within the deadline.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <API_KEY>. Keys have full access by default.

Query Parameters

url
string<uri>
required

Full HTTP(S) URL of the resource to download, such as an image, PDF, or page.

Minimum string length: 1
headers
object

Optional outbound HTTP headers, such as Referer, Cookie, or Authorization. Send as a JSON object or deep-object query params such as headers[Referer]=https://example.com/. Host, Content-Length, and hop-by-hop transport headers are rejected. Authorization and cookies are removed when a redirect changes origin.

country
enum<string>

Fetch the target page through a residential proxy in this country (ISO 3166-1 alpha-2).

Available options:
ad,
ae,
af,
ag,
ai,
al,
am,
ao,
ar,
at,
au,
aw,
az,
ba,
bb,
bd,
be,
bf,
bg,
bh,
bi,
bj,
bm,
bn,
bo,
bq,
br,
bs,
bw,
by,
bz,
ca,
cd,
cf,
cg,
ch,
ci,
cl,
cm,
cn,
co,
cr,
cv,
cw,
cy,
cz,
de,
dj,
dk,
dm,
do,
dz,
ec,
ee,
eg,
es,
et,
fi,
fj,
fr,
ga,
gb,
gd,
ge,
gf,
gg,
gh,
gm,
gn,
gp,
gq,
gr,
gt,
gu,
gw,
gy,
hk,
hn,
hr,
ht,
hu,
id,
ie,
il,
im,
in,
iq,
ir,
is,
it,
je,
jm,
jo,
jp,
ke,
kg,
kh,
kn,
kr,
kw,
ky,
kz,
la,
lb,
lc,
lk,
lr,
ls,
lt,
lu,
lv,
ly,
ma,
mc,
md,
me,
mf,
mg,
mk,
ml,
mm,
mn,
mo,
mq,
mr,
mt,
mu,
mv,
mw,
mx,
my,
mz,
na,
nc,
ne,
ng,
ni,
nl,
no,
np,
nz,
om,
pa,
pe,
pf,
pg,
ph,
pk,
pl,
pr,
ps,
pt,
py,
qa,
re,
ro,
rs,
ru,
rw,
sa,
sc,
sd,
se,
sg,
si,
sk,
sl,
sm,
sn,
so,
sr,
ss,
st,
sv,
sx,
sy,
sz,
tc,
td,
tg,
th,
tj,
tl,
tm,
tn,
tr,
tt,
tw,
tz,
ua,
ug,
us,
uy,
uz,
vc,
ve,
vg,
vi,
vn,
ye,
yt,
za,
zm,
zw
Example:

"de"

timeoutOpts
object

Optional request deadline and behavior on timeout. For GET requests, use timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded timeoutOpts object.

zdr
enum<string>
default:disabled

Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact [email protected]), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.

Available options:
enabled,
disabled
tags
string[]

Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 characters. Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

Maximum array length: 20
Required string length: 1 - 50
Example:

Response

Resource bytes and download metadata

success
enum<boolean>
required
Available options:
true
url
string<uri>
required

The requested resource URL.

finalUrl
string<uri>
required

The resource URL after redirects.

bytes
string<byte>
required

Base64-encoded resource bytes, without a data URI prefix. Decode this field to recover the downloaded file.

encoding
enum<string>
required
Available options:
base64
contentType
string
required

The Content-Type returned by the origin, including any charset. Defaults to application/octet-stream when absent.

contentLength
integer
required

Number of decoded resource bytes, before base64 encoding.

Required range: 0 <= x <= 20971520
statusCode
integer
required

HTTP status returned by the origin.

Required range: 200 <= x <= 299
request_id
string<uuid>
required

Unique id of this API call, also sent in the X-Request-Id response header. Quote it when contacting support about a failed request.

Example:

"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"

key_metadata
object

Credit usage, included whenever a valid API key is provided.