URL
Learn how to scrape any Grainger page by submitting its URL using the grainger source with Web Scraper API.
You can get Grainger results by providing your own URLs to our grainger source.
Request samples
In the samples below, we make a request to retrieve an example Costco URL.
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "grainger",
"url": "https://www.grainger.com/product/LITHONIA-LIGHTING-Exit-Sign-LED-1THX7",
}'
import requests
from pprint import pprint
# Structure payload.
payload = {
"source": "grainger",
"url": "https://www.grainger.com/product/LITHONIA-LIGHTING-Exit-Sign-LED-1THX7",
}
# Get response.
response = requests.request(
"POST",
"https://realtime.oxylabs.io/v1/queries",
auth=("USERNAME", "PASSWORD"),
json=payload,
)
# Print prettified response to stdout.
pprint(response.json())We use synchronous Realtime integration method in our examples. If you would like to use Proxy Endpoint or asynchronous Push-Pull integration, refer to the integration methods section.
Request parameter values
Generic
Basic setup and customization options for scraping Grainger pages.
- mandatory parameter
Last updated
Was this helpful?

