GET Request
Last updated
Last updated
Web scraping via GET requests requires users to pass two mandatory parameters to our API's endpoint:
api_key
- used to authenticate the request on our servers
url
- used to indicate the targeted URL that you want to scrape
Please make sure to escape the url
parameter's value!
The most basic URL example for an authorized request on our API is:
https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=<TARGETED_URL>
GET
https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https://webscrapingapi.com/
Please make sure to update <YOUR_API_KEY>
with your own API key. Find out how to obtain an API key.
The targeted website in this example is https://webscrapingapi.com/.
Name | Type | Description |
---|---|---|
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WebScrapingAPI | All-In-One Scraping API</title>
<meta name="twitter:title" content="WebScrapingAPI | All-In-One Scraping API">
<meta name="description"
content="WebScrapingAPI is a Rest API that helps you web scrape any HTML page, while handling: proxies, IP rotations, CAPTCHA's and javascript rendering.">
<meta name="twitter:description"
content="WebScrapingAPI is a Rest API that helps you web scrape any HTML page, while handling: proxies, IP rotations, CAPTCHA's and javascript rendering.">
<link rel="preload" as="image" href="https://www.webscrapingapi.com/assets/images/illustrations/hero/hero-mobile.png?v=41d081a6f0"/>
<link rel="preload" as="image" href="https://www.webscrapingapi.com/assets/images/illustrations/hero/hero.png?v=41d081a6f0"/>
<link rel="stylesheet" type="text/css" href="https://www.webscrapingapi.com/assets/bundles/bundle-fold.css?v=41d081a6f0"/>
<meta name="description" content="The Leading REST API for Web Scraping" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link rel="canonical" href="https://www.webscrapingapi.com/" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta property="og:site_name" content="WebScrapingAPI" />
<meta property="og:type" content="website" />
<meta property="og:title" content="WebScrapingAPI" />
<meta property="og:description" content="The Leading REST API for Web Scraping" />
<meta property="og:url" content="https://www.webscrapingapi.com/" />
<meta property="og:image" content="https://www.webscrapingapi.com/content/images/2021/07/Thumbnail.png" />
<meta property="article:publisher" content="https://www.facebook.com/ghost" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="WebScrapingAPI" />
<meta name="twitter:description" content="The Leading REST API for Web Scraping" />
<meta name="twitter:url" content="https://www.webscrapingapi.com/" />
<meta name="twitter:image" content="https://www.webscrapingapi.com/content/images/2021/07/Thumbnail.png" />
<meta name="twitter:site" content="@ghost" />
<meta property="og:image:width" content="2000" />
<meta property="og:image:height" content="803" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"publisher": {
"@type": "Organization",
"name": "WebScrapingAPI",
"url": "https://www.webscrapingapi.com/",
"logo": {
"@type": "ImageObject",
"url": "https://www.webscrapingapi.com/favicon.png",
"width": 60,
"height": 60
}
},
"url": "https://www.webscrapingapi.com/",
"image": {
"@type": "ImageObject",
"url": "https://www.webscrapingapi.com/content/images/2021/07/Thumbnail.png",
"width": 2000,
"height": 803
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.webscrapingapi.com/"
},
"description": "The Leading REST API for Web Scraping"
}
</script>
<meta name="generator" content="Ghost 4.48" />
<link rel="alternate" type="application/rss+xml" title="WebScrapingAPI" href="https://www.webscrapingapi.com/rss/" />
<script defer src="/public/cards.min.js?v=41d081a6f0"></script>
<link rel="stylesheet" type="text/css" href="/public/cards.min.css?v=41d081a6f0">
<!-- Segment -->
<script>
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="UOaGDN6IiSyZsSTCK63cf3e7rkqj1ifR";analytics.SNIPPET_VERSION="4.13.2";
analytics.load("UOaGDN6IiSyZsSTCK63cf3e7rkqj1ifR");
analytics.page();
}}();
</script>
<!-- End Segment -->
<!-- Weglot Translate -->
<link rel="alternate" hreflang="en" href="https://www.webscrapingapi.com">
<link rel="alternate" hreflang="de" href="https://de.webscrapingapi.com">
<link rel="alternate" hreflang="fr" href="https://fr.webscrapingapi.com">
<link rel="alternate" hreflang="es" href="https://es.webscrapingapi.com">
<link rel="alternate" hreflang="pt" href="https://pt.webscrapingapi.com">
<link rel="alternate" hreflang="zh" href="https://zh.webscrapingapi.com"><style>:root {--ghost-accent-color: #7dbec5;}</style>
</head>
<body>
<div id="overlay"></div>
<header>
<div id="header">
<a href="/" class="logo">
<img class="large-logo" src="https://www.webscrapingapi.com/assets/images/icons/full.svg?v=41d081a6f0" alt="wsa-logo" height="50" width="280" />
<img class="small-logo" src="https://www.webscrapingapi.com/assets/images/icons/short.svg?v=41d081a6f0" alt="wsa-logo" height="30" width="46" />
</a>
<ul id="header-menu">
<li class="menu-item" id="weglot_here"></li>
<li class="menu-item"><a href="https://www.webscrapingapi.com/product/">Product</a></li>
<li class="menu-item"><a href="https://www.webscrapingapi.com/pricing/">Pricing</a></li>
<li class="menu-item"><a href="https://www.webscrapingapi.com/blog/">Blog</a></li>
<li class="menu-item"><a href="https://www.webscrapingapi.com/docs/">Docs</a></li>
<li class="menu-item"><a href="https://app.webscrapingapi.com/login/">Log in</a></li>
<li class="menu-item btn"><a href="https://app.webscrapingapi.com/register" target="_blank">Sign up</a></li>
</ul>
<img id="menu-btn" src="https://www.webscrapingapi.com/assets/images/icons/menu.svg?v=41d081a6f0" alt="mobile-menu-btn" width="22" height="17" />
<img id="close-btn" data-src="https://www.webscrapingapi.com/assets/images/icons/close.svg?v=41d081a6f0" alt="mobile-menu-close-btn" width="15" height="17" />
</div>
</header>
<div id="splash">
<section>
<img src="https://www.webscrapingapi.com/assets/images/illustrations/hero/hero-mobile.png?v=41d081a6f0" class="hero-img-mobile"
alt="WebScrapingAPI" width="296" height="211">
<img src="https://www.webscrapingapi.com/assets/images/illustrations/hero/hero.png?v=41d081a6f0" class="hero-img" alt="WebScrapingAPI" width="280" height="50">
<div class="splash-text">
<h1>The leading REST API for web scraping</h1>
<p class="p-big">Join 10,000+ businesses that use WebScrapingAPI to gather data at scale.</p>
<a href="https://app.webscrapingapi.com/register" class="btn sketchy-btn">Try for free</a>
</div>
</section>
</div>
<div id="companies">
<section>
<h2>Join the 10,000+ companies, using WebScrapingAPI</h2>
<div class="logo-container">
<div class="deloitte"><img data-src="https://www.webscrapingapi.com/assets/images/illustrations/companies/Deloitte.png?v=41d081a6f0" alt="Deloitte" width="220" height="50"></div>
<div class="perrigo"><img data-src="https://www.webscrapingapi.com/assets/images/illustrations/companies/Perrigo.png?v=41d081a6f0" alt="Perrigo" width="150" height="60"></div>
<div class="steelseries"><img data-src="https://www.webscrapingapi.com/assets/images/illustrations/companies/Steelseries.png?v=41d081a6f0" alt="Steelseries" width="250" height="100"></div>
<div class="wunderman"><img data-src="https://www.webscrapingapi.com/assets/images/illustrations/companies/Wunderman.png?v=41d081a6f0" alt="Wunderman Thompson" width="220" height="100"></div>
<div class="infraware"><img data-src="https://www.webscrapingapi.com/assets/images/illustrations/companies/Infraware.jpg?v=41d081a6f0" alt="Infraware" width="200" height="80"></div>
</div>
</section>
</div>
<div id="features-1" class="features">
<section>
<h2>Empower every team with data</h2>
<p class="subtitle p-big">WebScrapingAPI collects the HTML from any web page using a simple API and provides
ready-to-process data to everyone in your company.</p>
<div class="features-container">
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/key.png?v=41d081a6f0" alt="key" width="146" height="160">
<div class="feature-text">
<h3>We make sure you never get blocked</h3>
<p>Dealing with bot detection tools can be a challenge. We handle everything from Javascript
rendering, CAPTCHAs, IP blocks, and automatic retries to fingerprinting. You only need to focus
on your goals. We handle everything else.</p>
</div>
</div>
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/location.png?v=41d081a6f0" alt="location" width="146" height="160">
<div class="feature-text">
<h3>100M+ Rotating proxies at your fingertips</h3>
<p>Access our unique, extensive pool of datacenter, mobile and residential IPs across hundreds of
ISPs, supporting real user devices and automatic IP rotation to increase reliability and avoid
IP blocks.</p>
</div>
</div>
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/custom.png?v=41d081a6f0" alt="custom" width="146" height="160">
<div class="feature-text">
<h3>Easy to use, <br/>easy to customize</h3>
<p>Our advanced features allow you to customize your requests based on your specific needs, play
with: headers, IP geolocation, sticky sessions, and much more.</p>
</div>
</div>
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/geotarget.png?v=41d081a6f0" alt="geotargeting" width="146" height="160">
<div class="feature-text">
<h3>Around the globe geotargeting</h3>
<p>Choose from 12 locations to send your web scraping API requests, with 195 more available for
enterprise customers, or just use random locations.</p>
</div>
</div>
<div class="additional-features">
<div class="additional">
<div><img data-src="https://www.webscrapingapi.com/assets/images/icons/chech-mark.svg?v=41d081a6f0" alt="checkmark" width="22" height="17"></div>
<span>99.99% Uptime</span>
</div>
<div class="additional">
<div><img data-src="https://www.webscrapingapi.com/assets/images/icons/chech-mark.svg?v=41d081a6f0" alt="checkmark" width="22" height="17"></div>
<span>Automatic Scaling</span>
</div>
<div class="additional">
<div><img data-src="https://www.webscrapingapi.com/assets/images/icons/chech-mark.svg?v=41d081a6f0" alt="checkmark" width="22" height="17"></div>
<span>24/7 Monitoring</span>
</div>
</div>
</div>
</section>
</div>
<div id="slider">
<h2>How companies use our API</h2>
<div class="slider">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/carousel/pricetag.png?v=41d081a6f0" alt="price" width="100" height="100" />
<span>Price and Products</span>
<p>Monitor your competitors' pricing and extract product information, such as available stock,
product descriptions, reviews, and much more. So, you can fully automate your pricing strategies
and product trends.</p>
</div>
<div class="swiper-slide">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/carousel/revenue.png?v=41d081a6f0" alt="revenue" width="100" height="100" />
<span>Financial Data</span>
<p>Base your investment decisions on 100% certain and authentic data. Go granular on compiling
multiple sources of information and identify your risks and opportunities to make the best
business decisions.</p>
</div>
<div class="swiper-slide">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/carousel/travel.png?v=41d081a6f0" alt="travel" width="100" height="100" />
<span>Travel Fare Aggregation</span>
<p>Collect data from hotel and flight company websites, online travel agencies, and other sources.
Ensure a fast data gathering process, and overcome all the challenges you might face while
obtaining information.</p>
</div>
<div class="swiper-slide">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/carousel/reviews.png?v=41d081a6f0" alt="reviews" width="100" height="100" />
<span>Customer Reviews</span>
<p>Go deeper with your customer intelligence processes by gathering reviews from all over the
Internet into one place. Interpret their different aspects to better understand your customers
and their needs.</p>
</div>
<div class="swiper-slide">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/carousel/hr.png?v=41d081a6f0" alt="hr" width="100" height="100" />
<span>HR Job & Hiring Data</span>
<p>Scrape job boards and career pages to analyze available spots and the hiring strategy of your
competitors. We help you to find the number of vacant spots, new hirings, and other valuable
pieces of information.</p>
</div>
<div class="swiper-slide">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/carousel/realestate.png?v=41d081a6f0" alt="real estate" width="100" height="100" />
<span>Real Estate</span>
<p>Gather and analyze real estate data from multiple platforms to fully understand the market
direction, improve your searches, or build alerts for your target acquisitions. Reach your goals
with just a few clicks.</p>
</div>
</div>
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</div>
<div id="features-2" class="features">
<section>
<h2>Why WebScrapingAPI works for you</h2>
<p class="subtitle">Our clients love us because we never settle on these.</p>
<div class="features-container">
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/scale.png?v=41d081a6f0" alt="scale" width="146" height="160">
<div class="feature-text">
<h3>Mass web crawling</h3>
<p>Our API enables you to execute mass crawling operations on any website you target. We implement
the latest anti-bot detection tools to achieve high success rates.</p>
</div>
</div>
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/fast.png?v=41d081a6f0" alt="speed" width="146" height="160">
<div class="feature-text">
<h3>Speed obsessive architecture</h3>
<p>We use state-of-the-art technology to make sure your target website loads in the blink of an eye,
and you get the HTML content instantly.</p>
</div>
</div>
<div class="feature">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/boxes.png?v=41d081a6f0" alt="boxes" width="146" height="160">
<div class="feature-text">
<h3>Javascript rendering: What users see is what you get</h3>
<p>Activate Javascript rendering using real browsers and get the exact information displayed to the
users, including single-page applications using React, AngularJS, Vue, or any other
libraries.</p>
</div>
</div>
</div>
</section>
</div>
<div id="one-API">
<section>
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/knife.png?v=41d081a6f0" alt="multitool" width="255" height="227">
<div class="one-api-text">
<h2>One API. Cleaner code.</h2>
<p class="p-big">Use one API to collect data, from any website. Integrate with any development language and
customize your
requests in just 30 seconds.</p>
</div>
</section>
</div>
<div id="testimonials">
<h2>Trusted by startups and the world's largest companies</h2>
<img class="background" data-src="https://www.webscrapingapi.com/assets/images/illustrations/reviews/Background.svg?v=41d081a6f0" alt="background" width="650" height="375">
<div class="testimonials-container">
<div class="testimonial">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/reviews/Avatar1.png?v=41d081a6f0" alt="avatar" width="65" height="73">
<span>Nic Stevens</span>
<p>WebScrapingAPI has enabled us to streamline the data capture process with the help of Javascript
rendering.</p>
</div>
<div class="testimonial">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/reviews/Avatar2.png?v=41d081a6f0" alt="avatar" width="65" height="73">
<span>Sam Coren</span>
<p>WebScrapingAPI has helped us grow our business. The customer support has been amazing, and honestly, if
we went with another company, we would be lost.</p>
</div>
<div class="testimonial">
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/reviews/Avatar3.png?v=41d081a6f0" alt="avatar" width="65" height="73">
<span>Grace Dilworth</span>
<p>Very impressed so far. Moving over from previous work with ScrapeStack, and their support (Hellen did my
onboarding and is very helpful) and product are top-notch.</p>
</div>
</div>
</div>
<div id="cta">
<section>
<h2>Start scraping data with WebScrapingAPI</h2>
<div class="buttons">
<a href="https://app.webscrapingapi.com/register" class="btn sketchy-btn">Try for free</a>
<a href="/contact" class="btn">Contact sales</a>
</div>
<div class="cta-bottom">
Get started with <span>5,000 free API calls. <br/>No credit card required.</span>
<img data-src="https://www.webscrapingapi.com/assets/images/illustrations/send.png?v=41d081a6f0" alt="send" width="185" height="170" />
</div>
</section>
</div>
<footer id="footer">
<section>
<div class="footer-menus">
<ul class="footer-menu">
<li class="title">Product</li>
<li><span></span></li>
<li class="menu-item"><a href="/product">Features</a></li>
<li class="menu-item"><a href="/pricing">Pricing</a></li>
<li class="menu-item"><a href="https://status.webscrapingapi.com/" target="_blank"
rel="noopener">Status</a></li>
<li class="menu-item"><a href="/careers">Careers</a></li>
</ul>
<ul class="footer-menu">
<li class="title">Account</li>
<li><span></span></li>
<li class="menu-item"><a href="https://app.webscrapingapi.com/register">Sign Up FREE</a></li>
<li class="menu-item"><a href="https://app.webscrapingapi.com/login">Log In</a></li>
</ul>
<ul class="footer-menu">
<li class="title">Legal</li>
<li><span></span></li>
<li class="menu-item"><a href="/terms">Terms & Conditions</a></li>
<li class="menu-item"><a href="/privacy">Privacy Policy</a></li>
<li class="menu-item"><a href="/cookies">Cookie Policy</a></li>
<li class="menu-item"><a href="/agreement">Service Agreement</a></li>
</ul>
<ul class="footer-menu">
<li class="title">Support</li>
<li><span></span></li>
<li class="menu-item"><a href="/contact">Contact us</a></li>
<li class="menu-item"><a href="https://app.webscrapingapi.com/documentation/getting-started">API Documentation</a></li>
<li class="menu-item"><a href="https://kb.webscrapingapi.com/">Knowledge Base</a></li>
<li class="menu-item"><a href="/docs">FAQ</a></li>
<li class="menu-item"><a href="/docs/#sdk">SDK</a></li>
</ul>
</div>
<div class="footer-copyright">© <span id="footer-year"></span> WebScrapingAPI</div>
</section>
</footer>
<script>
const bundle = document.createElement('link');
bundle.rel = 'stylesheet';
bundle.href = 'https://www.webscrapingapi.com/assets/bundles/bundle.css?v=41d081a6f0';
bundle.type = 'text/css';
const defer = document.getElementsByTagName('link')[0];
defer.parentNode.insertBefore(bundle, defer);
</script>
<script id="bundle-loader">
function scrollLoad(script)
{
const scrollLoadScript = function() {
loadSingleBundle(script)
window.removeEventListener('scroll', scrollLoadScript)
}
window.addEventListener('scroll', scrollLoadScript)
}
scrollLoad("https://www.google.com/recaptcha/api.js")
function loadSingleBundle(bundleName, onLoaded)
{
let js_bundle = document.createElement('script')
js_bundle.src = bundleName
if(onLoaded) js_bundle.onload = onLoaded
const defer = document.getElementById('bundle-loader')
defer.parentNode.insertBefore(js_bundle, defer)
}
const pathname = window.location.pathname
let is_post = false
let is_blog = false
let bundleName
const pages = [
'/product/',
'/contact/',
'/terms/',
'/privacy/',
'/cookies/',
'/agreement/',
'/docs/',
'/careers/',
]
loadSingleBundle('https://www.webscrapingapi.com/assets/bundles/bundle-fold.js?v=41d081a6f0')
if (pathname === '/') {
bundleName = 'https://www.webscrapingapi.com/assets/bundles/bundle-home.js?v=41d081a6f0'
} else if (pathname === '/pricing/') {
bundleName = 'https://www.webscrapingapi.com/assets/bundles/bundle-pricing.js?v=41d081a6f0'
} else if (pathname === '/blog/') {
bundleName = 'https://www.webscrapingapi.com/assets/bundles/bundle-blog.js?v=41d081a6f0'
is_blog = true
} else if (pages.indexOf(pathname) !== -1) {
bundleName = 'https://www.webscrapingapi.com/assets/bundles/bundle-page.js?v=41d081a6f0'
} else if (is_post) {
bundleName = 'https://www.webscrapingapi.com/assets/bundles/bundle-post.js?v=41d081a6f0'
} else {
console.log("No bundle found for this page.")
}
if (bundleName) {
const load_bundle = function() {
loadSingleBundle(bundleName)
window.removeEventListener('scroll', load_bundle)
}
window.addEventListener('scroll', load_bundle)
}
</script>
<div id="beacon-container" class="beacon-facade">
<div class="frame-content">
<button aria-label="Open Beacon popover" aria-expanded="false" aria-controls="HSBeaconContainerFrame" class="sc-Axmtr fpMCQD">
<span class="sc-fzoLsD bIvNUR c-FabButton__icon--icon">
<svg width="24" height="22" xmlns="http://www.w3.org/2000/svg">
<path d="M20.347 20.871l-.003-.05c0 .017.001.034.003.05zm-.243-4.278a2 2 0 0 1 .513-1.455c1.11-1.226 1.383-2.212 1.383-4.74C22 5.782 18.046 2 13.125 2h-2.25C5.954 2 2 5.78 2 10.399c0 4.675 4.01 8.626 8.875 8.626h2.25c.834 0 1.606-.207 3.212-.798a2 2 0 0 1 1.575.083l2.355 1.161-.163-2.878zM10.875 0h2.25C19.13 0 24 4.656 24 10.399c0 2.6-.25 4.257-1.9 6.08l.243 4.279c.072.845-.807 1.471-1.633 1.162l-3.682-1.816c-1.212.446-2.527.921-3.903.921h-2.25C4.869 21.025 0 16.142 0 10.4 0 4.656 4.869 0 10.875 0z" fill="#FFF"></path>
</svg>
</span>
</button>
</div>
</div>
<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js" onload="initWeglot()" defer></script>
<script>
function initWeglot() {
Weglot.initialize({
api_key: 'wg_c9d22e5594aecc2f09b25cf24ae190be3'
});
}
</script>
<!-- Weglot Translate -->
</body>
</html>
{
"status": "Failure",
"status_code": 400,
"created_at": "2022-09-09T14:05:40.566Z",
"processed_at": null,
"time_taken": {
"total": 0.021,
"scraping": 0
},
"error": "key `url` required."
}
{
"error": "Authentication failure: Invalid API key. Get a free API Key at https://app.webscrapingapi.com/register or upgrade your plan"
}
Below are the integration examples of the URL we have discussed earlier:
curl --request GET --url "https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com"
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.webscrapingapi.com",
"port": null,
"path": "/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com",
"headers": {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
import requests
API_KEY = '<YOUR_API_KEY>'
SCRAPER_URL = 'https://api.webscrapingapi.com/v1'
TARGET_URL = 'https://httpbin.org/post'
PARAMS = {
"api_key":API_KEY,
"url": TARGET_URL,
}
response = requests.get(SCRAPER_URL, params=PARAMS)
print(response)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com")
.asString();
var client = new RestClient("https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fbing.com")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
<!doctype html>
<html lang="es" dir="ltr">
<head>
<meta name="theme-color" content="#4F4F4F" />
<meta name="description"
content="Bing te ayuda a convertir la información en acción, ya que facilita y acelera la transición de la búsqueda a la actividad concreta." />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="fb:app_id" content="570810223073062" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Info" />
<meta property="og:image" content="https://www.bing.com/th?id=OHR.Hunebourg_ROW9321634276_tmb.jpg&rf=" />
<meta property="og:image:width" content="1366" />
<meta property="og:image:height" content="768" />
<meta property="og:url" content="https://www.bing.com/?form=HPFBBK&ssd=20220426_0700&mkt=es-ES" />
<meta property="og:site_name" content="Bing" />
<meta property="og:description" content="We're enjoying the view of Château de Hunebourg, n" />
<title>Bing</title>
<link rel="shortcut icon" href="/sa/simg/favicon-2x.ico" />
<link rel="preload" href="/th?id=OHR.Hunebourg_ROW9321634276_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&qlt=40"
as="image" id="preloadBg" />
<link rel="preload" href="https://r.bing.com/rp/lmu8EBCaPRMKtay8LSArGyY3mv4.br.js" as="script" />
<link rel="preconnect" href="https://r.bing.com" />
<link rel="preconnect" href="https://r.bing.com" crossorigin />
<link rel="dns-prefetch" href="https://r.bing.com" />
<link rel="dns-prefetch" href="https://r.bing.com" crossorigin />
<style type="text/css">
@media(max-width:1237px) {
#id_n {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100px;
display: inline-block
}
}
.rwds_svg {
vertical-align: top;
display: inline-block
}
.rwds_svg.mobile {
float: left
}
.rwds_svg.serp {
margin: 8px 0 0 8px
}
.rwds_svg.serp.mobile {
margin: 8px 4px 0 8px
}
.rwds_svg.hp {
margin: 5px 4px 0 8px
}
.rwds_svg.hp.mobile {
margin: 5px 4px 0 10px
}
.rhlined,
.rhfill {
vertical-align: top;
width: 32px;
height: 32px
}
#id_rh,
#id_rbh {
position: relative
}
.rhcoinflip {
vertical-align: top;
width: 60px;
height: 60px;
position: absolute;
right: -6px;
top: -6px
}
#idCont .rhcoinflip {
position: absolute;
right: -5px;
top: -9px
}
#rh_meter {
vertical-align: top;
width: 40px;
height: 40px;
margin-left: -36px;
margin-top: -4px
}
.rh_reedm .rhlined,
.rhfill,
.rh_reedm .meter {
display: none
}
.rhlined,
.rh_reedm .rhfill,
#rh_meter {
display: inline-block
}
.rd_hide {
visibility: hidden
}
.rhlined.hp .meter,
.rhfill.hp .meter {
stroke: rgba(255, 255, 255, .4)
}
.noBg .rhlined.hp .meter,
.noBg .rhfill.hp .meter,
.rhlined.serp .meter,
.rhfill.serp .meter {
stroke: rgba(177, 177, 177, .4)
}
.rhlined.hp .medal,
.rhfill.hp .medal {
fill: #fff
}
.noBg .rhlined.hp .medal,
.rhlined.serp .medal {
fill: #919191
}
.noBg .rh_reedm .rhfill.hp .medal,
.rh_reedm .rhfill.serp .medal {
fill: #00809d
}
#rh_animcrcl {
fill: none;
stroke: transparent;
stroke-width: 0
}
#rh_animcrcl.anim {
stroke-width: 2
}
#rh_animcrcl.anim.hp {
stroke: #fff
}
@media screen and (-ms-high-contrast:black-on-white) {
.rhlined.hp .medal,
.rhfill.hp .medal {
fill: #000
}
#rh_animcrcl.anim.hp {
stroke: #000
}
}
#rh_animcrcl.serp.anim {
stroke: #00809d
}
#rh_animpath.serp.anim {
fill: #00809d
}
.noBg #rh_animcrcl.anim.hp {
stroke: #00809d
}
.rh_scale .rhfill,
.rh_scale #rh_meter {
animation: scaling .4s cubic-bezier(.3, .55, .1, 1)
}
@-webkit-keyframes scaling {
0% {
transform: scale(1, 1)
}
50% {
transform: scale(1.3, 1.3)
}
100% {
transform: scale(1, 1)
}
}
@keyframes scaling {
0% {
transform: scale(1, 1)
}
50% {
transform: scale(1.3, 1.3)
}
100% {
transform: scale(1, 1)
}
}
#tallhead #idMobileCont {
position: absolute
}
#tallhead #idMobileCont>* {
top: 3px
}
#idMobileCont>* {
vertical-align: top;
display: inline-block;
top: 10px
}
#idMobileCont #id_rh,
#idMobileCont #id_rbh {
font-size: .8125rem;
position: relative;
margin-top: 2px
}
#idMobileCont #id_rh #id_rc.hp,
#idMobileCont #id_rbh #id_rc.hp,
#idMobileCont #id_rh #id_rbc.hp,
#idMobileCont #id_rbh #id_rbc.hp {
color: #fff;
line-height: 38px
}
#idMobileCont #id_rh #id_rc.serp,
#idMobileCont #id_rbh #id_rc.serp,
#idMobileCont #id_rh #id_rbc.serp,
#idMobileCont #id_rbh #id_rbc.serp {
color: #000;
line-height: 45px
}
#id_rbh.hp {
padding-right: 12px
}
#id_rbh.hp.reverse {
padding-left: 8px;
padding-right: 0
}
#id_rbh.serp {
padding-right: 0
}
#id_rbh.serp.reverse {
padding-left: 14px
}
#id_rbh.hp svg {
height: 30px;
fill: white
}
#id_rbh.serp svg {
height: 25px;
fill: #818285
}
@media(max-width:1356.9px) {
#id_h #id_rbh,
#idCont #id_h #id_rbh {
display: none
}
}
.bnc-hci {
position: relative;
top: 4px;
padding-left: 8px
}
html,
body {
font-family: "Segoe UI", Segoe, Tahoma, Arial, Verdana, sans-serif;
background-color: rgba(34, 34, 34, .9);
overflow: hidden;
width: 100%;
height: 100%
}
html,
body,
a,
div,
span,
table,
tr,
td,
strong,
ul,
ol,
li,
h1,
h2,
h3,
p,
input {
font-weight: inherit;
font-size: inherit;
list-style: none;
border-spacing: 0;
border: 0;
border-collapse: collapse;
text-decoration: none;
padding: 0;
margin: 0
}
a {
color: initial
}
a:hover {
text-decoration: none
}
object {
position: absolute
}
video::-webkit-media-controls {
display: none !important
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
display: none
}
body:not(.tabbing) *:focus {
outline: none
}
.hpapp {
height: 100%
}
.hp_body,
.hp_cont {