Web Scraping API
With a simple GET request to our Web Scraping API, you can scrape any webpage.
Simply send a GET request to https://api.scrapingdog.com/scrape with two query string parameters, api_key which is your personal API key, and url which is the target URL you would like to scrape.
Parameters
Parameter
Description
api_key required
Your personal API key. Available on your dashboard Type: String
url required
URL of the page you want to scrape. Type: String
dynamic
It tells our server whether you want to render JS or not. It can be either true or false. By default it is true. Type: Boolean
Usage
curl "https://api.scrapingdog.com/scrape?api_key=5e5a97e5b1ca5b194f42da86&url=http://httpbin.org/ip&dynamic=false"import requests
url = "https://api.scrapingdog.com/scrape"
params = {
"api_key": "5e5a97e5b1ca5b194f42da86",
"url": "http://httpbin.org/ip",
"dynamic": "false"
}
response = requests.get(url, params=params)
print(response.text)const axios = require('axios');
const apiUrl = 'https://api.scrapingdog.com/scrape';
const apiKey = '5e5a97e5b1ca5b194f42da86';
const targetUrl = 'http://httpbin.org/ip';
const dynamic = false;
const params = {
api_key: apiKey,
url: targetUrl,
dynamic: dynamic.toString(),
};
axios
.get(apiUrl, { params })
.then((response) => {
if (response.status === 200) {
console.log(response.data);
} else {
console.error(`Failed to retrieve data. Status code: ${response.status}`);
}
})
.catch((error) => {
console.error('An error occurred:', error.message);
});
Response
<html>
<head>
</head>
<body>
<pre style="word-wrap: break-word; white-space: pre-wrap;">
{"origin":"27.63.83.45"}
</pre>
</body>
</html>Last updated