Sam's Club
Learn how to start scraping Sam's Club.
Sam's Club has no dedicated source. You scrape its pages on samsclub.com (United States) and sams.com.mx (Mexico) with the universal source by passing the page url. The response returns the page HTML in content, in the standard response structure described in Realtime and Push-Pull.
https://www.samsclub.com/search?q=<search-term>, https://www.sams.com.mx/search?q=<search-term>
https://www.samsclub.com/ip/<product-name>/<product-id>, https://www.sams.com.mx/ip/<product-name>/<product-id>
Search
Request samples
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "universal",
"url": "https://www.samsclub.com/search?q=tv"
}'import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'universal',
'url': 'https://www.samsclub.com/search?q=tv'
}
# Get response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'),
json=payload
)
# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())Request parameter values
source
Sets the scraper. Sam's Club pages are scraped with the universal source.
universal
url
The URL of the search page, e.g. https://www.samsclub.com/search?q=tv.
-
- mandatory parameter
Product
Request samples
Request parameter values
source
Sets the scraper. Sam's Club pages are scraped with the universal source.
universal
url
The URL of the product page, e.g. https://www.samsclub.com/ip/VIZIO-50-Class-Quantum-4K-QLED-Smart-TV/15505523006.
-
- mandatory parameter
Localization and Filtering
Store numbers for each site are in these lists (store_id column):
context: store_id
Search and product pages
Sam's Club store (club) number as a string, e.g. "4702". The page then shows that club's prices and availability. Use a number from the list for the site you scrape.
-
context: fulfillment_type
Search and product pages
Fulfillment method. Available values: pickup, delivery, shipping. Takes effect together with store_id.
pickup
Last updated
Was this helpful?