Skip to main content

API Features

Basic request

To scrape a web page using the Scrape.Fun API, simply use the API's base endpoint and append the URL you would like to scrape as well as your API access key as GET parameters. There is also a series of optional parameters you can choose from. Below you will find an example request used to scrape the URL https://apple.com.

Example API Request:

https://api.scrape.fun/scrape
?token=YOUR_API_ACCESS_KEY
&url=https://apple.com

Request Parameters:

KeyDescription
token[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard.
url[Required] Specify the URL of the web page you would like to scrape.
render_js[optional] Set to 0 (off, default) or 1 (on) depending on whether or not to render JavaScript on the target web page. JavaScript rendering is done using a Google Chrome headless browser.
proxy_location[optional] Specify the 2-letter code of the country you would like to us as a proxy geolocation for your scraping API request. Supported countries differ by proxy type, please refer to the Proxy Locations section for details.

Example API Response:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">

<head>
[...] // 44 lines skipped
</head>

<body>
[...] // 394 lines skipped
</body>

</html>

API response shortened: Please note that the API response above has been shortened for readability purposes. To see the entire API resonse, please click the "Run" button in the Playground section of the dashboard.

JavaScript Rendering

By default, the Scrape.Fun API does not render JavaScript on the target web page. If you would like to render JavaScript on the target web page, you can do so by setting the render_js parameter to 1.

Example API Request:

https://api.scrape.fun/scrape
?token=YOUR_API_ACCESS_KEY
&url=https://apple.com
&render_js =1

Proxy Locations

The Scrape.Fun API is making use of a pool of 35+ million IP addresses worldwide. By default, the API will auto-rotate IP addresses in a way that the same IP address is never used twice in a row.

The Scrape.Fun API supports more than 100 global geolocations your scraping request can be sent from. Using the API's proxy_location HTTP GET parameter you can choose a specific country by its 2-letter country code for your scraping request. Please find an example API request below, which specifies au (for Australia) as proxy location.

Example API Request:

https://api.scrape.fun/scrape
?token=YOUR_API_ACCESS_KEY
&url=https://apple.com
&proxy_location=au

Supported Proxy Locations:

CodeCountry
usUnited States
gbGreat Britain
alAlbania
arArgentina
amArmenia
auAustralia
atAustria
azAzerbaijan
bdBangladesh
byBelarus
beBelgium
boBolivia
brBrazil
bgBulgaria
khCambodia
caCanada
clChile
cnChina
coColombia
crCosta Rica
hrCroatia (Hrvatska)
cyCyprus
czCzech Republic
dkDenmark
doDominican Republic
ecEcuador
egEgypt
eeEstonia
fiFinland
frFrance
geGeorgia
deGermany
grGreece
gtGuatemala
hkHong Kong
huHungary
isIceland
inIndia
idIndonesia
ieIreland
imIsle of Man
ilIsrael
itItaly
jmJamaica
jpJapan
joJordan
kzKazakhstan
kgKyrgyzstan
laLaos
lvLatvia
ltLithuania
luLuxembourg
myMalaysia
mxMexico
mdMoldova
nlNetherlands
nzNew Zealand
noNorway
pePeru
phPhilippines
ruRussia
saSaudi Arabia
sgSingapore
krSouth Korea
esSpain
lkSri Lanka
seSweden
chSwitzerland
twTaiwan
tjTajikistan
thThailand
trTurkey
tmTurkmenistan
uaUkraine
aeUnited Arab Emirates
zuUzbekistan
vnVietnam