Pangolinfo Amazon Scraper - Official Python SDK for structured e-commerce data from Amazon, Walmart, and more.
Project description
pangolinfo-amazon-scraper
Official Python SDK for the Pangolinfo Scrape API — structured e-commerce data from Amazon, Walmart, eBay, Shopify and more, delivered as JSON, clean HTML or LLM-friendly Markdown.
Built and maintained by PANGOLIN INFO TECH PTE. LTD.
Why this SDK
The Pangolinfo Scrape API dynamically adapts to page-structure changes so you never maintain fragile selectors. You get:
- Structured JSON for product details, keyword search, rankings, reviews and more
- Raw HTML and Markdown output for AI/LLM pipelines
- 99.9% uptime with built-in anti-bot handling and residential IP rotation
- Sync + async interfaces from a single package
- Coverage of Amazon, Walmart, eBay, Shopify, Shopee
Installation
pip install pangolinfo-amazon-scraper
Quick start
1. Get a free API key
Sign up at tool.pangolinfo.com — open-source contributors get 200 free API calls and full parser templates. See the free-tier details.
2. Use the SDK
from pangolinfo_amazon_scraper import PangolinfoClient
# Authenticate with a token from your dashboard...
client = PangolinfoClient(token="your_bearer_token")
# ...or with email/password (the SDK logs in for you)
# client = PangolinfoClient(email="you@example.com", password="secret")
# Fetch an Amazon product by ASIN
result = client.amazon.get_product("B0DYTF8L2W", zipcode="10041")
print(result.json_data)
# {"asin": "B0DYTF8L2W", "title": "...", "price": ..., "rating": ..., ...}
Async usage
import asyncio
from pangolinfo_amazon_scraper import AsyncPangolinfoClient
async def main():
async with AsyncPangolinfoClient(token="your_bearer_token") as client:
result = await client.amazon.get_product("B0DYTF8L2W")
print(result.json_data)
asyncio.run(main())
Features
Multiple output formats
# Structured JSON (default)
result = client.scrape(
url="https://www.amazon.com/dp/B0DYTF8L2W",
parser_name="amzProductDetail",
formats=["json"],
)
# LLM-friendly Markdown
md = client.scrape(url="...", parser_name="amzProductDetail", formats=["markdown"])
print(md.markdown)
# Raw HTML
html = client.scrape(url="...", parser_name="amzProductDetail", formats=["rawHtml"])
print(html.html)
# All three at once
result = client.scrape(url="...", parser_name="amzProductDetail", formats=["json", "rawHtml", "markdown"])
Platform helpers
# Amazon
client.amazon.get_product("B0DYTF8L2W", zipcode="10041")
client.amazon.search("wireless earbuds", domain="www.amazon.com")
# Walmart
client.walmart.get_product("123456789")
client.walmart.search("blender")
Generic scrape (any platform / parser)
from pangolinfo_amazon_scraper import PARSERS
# Use a known parser key
result = client.scrape(
url="https://www.amazon.com/dp/B0DYTF8L2W",
parser_name=PARSERS["amazon_product_detail"],
formats=["json"],
zipcode="10041",
)
# Or pass the raw parser name the API accepts
result = client.scrape(
url="https://www.ebay.com/itm/...",
parser_name="ebayProductDetail",
formats=["json"],
)
Async callbacks for high-throughput jobs
result = client.scrape(
url="https://www.amazon.com/dp/B0DYTF8L2W",
parser_name="amzProductDetail",
formats=["json"],
callback_url="https://your-server.com/webhook", # async mode
)
API reference
PangolinfoClient
| Method | Description |
|---|---|
PangolinfoClient(token=...) |
Create a client with an existing bearer token |
PangolinfoClient(email=..., password=...) |
Create a client that logs in lazily |
client.scrape(url, parser_name, formats, zipcode, ...) |
Core scrape call |
client.amazon.get_product(asin, zipcode) |
Amazon product detail |
client.amazon.search(keyword) |
Amazon keyword search |
client.walmart.get_product(product_id) |
Walmart product detail |
client.walmart.search(keyword) |
Walmart keyword search |
client.login() |
Force (re)authentication |
client.close() |
Close the HTTP connection pool |
AsyncPangolinfoClient
Async mirror of PangolinfoClient — every method is a coroutine and supports
async with.
ScrapeResult
| Attribute | Type | Description |
|---|---|---|
result.json_data |
dict / list / None |
Parsed JSON payload |
result.html |
str / None |
Raw HTML (when rawHtml requested) |
result.markdown |
str / None |
Markdown (when markdown requested) |
result.success |
bool |
True when code == 0 |
result.code |
int |
API response code |
result.raw |
dict |
Full unmodified response |
Exceptions
| Exception | When |
|---|---|
PangolinfoError |
Base class for all SDK errors |
AuthenticationError |
Login failed or credentials missing |
APIError |
API returned non-zero code |
TimeoutError |
Request exceeded the timeout |
ValidationError |
Invalid arguments supplied |
Supported parsers
| Key | Parser name | Platform |
|---|---|---|
amazon_product_detail |
amzProductDetail |
Amazon |
amazon_keyword_search |
amzKeywordSearch |
Amazon |
amazon_best_sellers |
amzBestSellers |
Amazon |
amazon_reviews |
amzReview |
Amazon |
walmart_product_detail |
wmtProductDetail |
Walmart |
walmart_keyword_search |
wmtKeywordSearch |
Walmart |
amzProductDetailis confirmed in the official example. Other parsers follow the Pangolinfo documentation naming — pass any raw parser name toclient.scrape()if yours isn't listed.
Links
- Homepage: pangolinfo.com
- Documentation: docs.pangolinfo.com
- Get a free API key: tool.pangolinfo.com
- Source code: github.com/Pangolin-spg/pangolinfo-amazon-scraper
- Support: support@pangolinfo.com
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Build distributions
python -m build
# Upload to PyPI
twine upload dist/*
License
MIT — © PANGOLIN INFO TECH PTE. LTD.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pangolinfo_amazon_scraper-0.1.0.tar.gz.
File metadata
- Download URL: pangolinfo_amazon_scraper-0.1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23a3e4a399de5f40c78de86d33a1f4a347a65d5cb4e9cb85ee45820d10524324
|
|
| MD5 |
5812ba0c2c8cab4daf788e2c3ba98e21
|
|
| BLAKE2b-256 |
a9bfd685abee9d934a0a757ddac3b73124265f18f8cd6937c0d5c8102b28085c
|
File details
Details for the file pangolinfo_amazon_scraper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pangolinfo_amazon_scraper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8491e123096c785cbbdb8f9f00e118195fd8ec5d3b315f3b4c461b8f0914d25
|
|
| MD5 |
24075ee8a26176b499bbae44e8bc53d3
|
|
| BLAKE2b-256 |
184f77c94231e4e5c61b4615cb8cc0b51f98df6ab9f4de3810fc3e460430254d
|