Skip to main content

langchain-asin

LangChain integration for Asin: search Amazon, read a product's price history and compare its sellers' offers.

Installation

pip install -U langchain-asin
export ASIN_API_KEY="your-api-key"

Get an API key at www.asin.dev/app.

Tools

Class Tool name What it does
AsinAmazonSearch asin_amazon_search Search an Amazon store through Asin.
AsinPriceHistory asin_price_history Read the price history of an Amazon product through Asin.
AsinOffers asin_offers Read the sellers' offers for an Amazon product through Asin.

Each tool takes api_key (defaults to ASIN_API_KEY), base_url and timeout, plus the settings shown in its docstring. Errors (invalid key, no credits, rate limit, timeout) come back to the model as a ToolException message, without the API key. Every tool has an async version.

from langchain_asin import AsinAmazonSearch

tool = AsinAmazonSearch()
print(tool.invoke({"query": "kindle"}))

In an agent

from langchain.agents import create_agent
from langchain_asin import AsinAmazonSearch, AsinPriceHistory, AsinOffers

agent = create_agent("openai:gpt-4.1-mini", tools=[AsinAmazonSearch(), AsinPriceHistory(), AsinOffers()])
result = agent.invoke({"messages": [{"role": "user", "content": "..."}]})

Development

pip install -e ".[test]"
pytest tests/unit_tests

License

MIT

Metadata

Release files for langchain-asin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-asin 0.1.0
File Size Uploaded Provenance Actions
langchain_asin-0.1.0.tar.gz 7.3 kB Without provenance Details for langchain_asin-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-asin 0.1.0
File Interpreter ABI Platform Actions
langchain_asin-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_asin-0.1.0-py3-none-any.whl

Total release size: 14.1 kB

Release files / langchain_asin-0.1.0.tar.gz

Download URL langchain_asin-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
99e8f5fc7c4080fb0ac4c89cb14c6a1172e49d2c2acfd8b99a10ceb4887d5bd4
BLAKE2b-256 checksum
How to use checksums
2bf7c0ac8b695b8a169edbb1c43ebae0f0495e57b530389ef853cd3126a3e519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / langchain_asin-0.1.0-py3-none-any.whl

Download URL langchain_asin-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69d370537a1dc77bf580da8558e4ff83e656d7c12f5d5421d7ae1885d578c63e
BLAKE2b-256 checksum
How to use checksums
9dc090f338620607130f5247d80e82f5d5aee2282aaced4ba479cddc407ddba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for langchain-asin 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page