Skip to content

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

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

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages