langchain - 💡(How to fix) Fix Community Tool: BuyWhere — real-time Singapore product catalog API for LangChain agents [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#37003Fetched 2026-04-26 05:05:55
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
closed ×1commented ×1labeled ×1

Code Example

from langchain.tools import StructuredTool
import requests

def search_singapore_products(query: str) -> list:
    """Search live product prices in Singapore across Harvey Norman, Shopee, Lazada"""
    resp = requests.get(
        "https://api.buywhere.ai/search",
        params={"q": query, "region": "sg"},
        headers={"Authorization": "Bearer YOUR_API_KEY"}
    )
    return resp.json()

buywhere_tool = StructuredTool.from_function(
    func=search_singapore_products,
    name="singapore_product_search",
    description="Search live product prices in Singapore from Harvey Norman, Shopee, and Lazada"
)
RAW_BUFFERClick to expand / collapse

BuyWhere — Singapore E-Commerce Tool for LangChain

Summary: BuyWhere provides a real-time product catalog API for AI agents in Singapore/SEA. It would make a great LangChain community tool for shopping research use cases.

Website: https://buywhere.ai API docs: https://buywhere.ai/developers/ GitHub: https://github.com/BuyWhere/buywhere-mcp

What it does

Search live product pricing across Harvey Norman, Shopee, and Lazada (Singapore's largest retailers) with a single API call. Returns structured JSON: product name, price, store, URL.

LangChain integration example

from langchain.tools import StructuredTool
import requests

def search_singapore_products(query: str) -> list:
    """Search live product prices in Singapore across Harvey Norman, Shopee, Lazada"""
    resp = requests.get(
        "https://api.buywhere.ai/search",
        params={"q": query, "region": "sg"},
        headers={"Authorization": "Bearer YOUR_API_KEY"}
    )
    return resp.json()

buywhere_tool = StructuredTool.from_function(
    func=search_singapore_products,
    name="singapore_product_search",
    description="Search live product prices in Singapore from Harvey Norman, Shopee, and Lazada"
)

Use case

Shopping assistant agents for Singapore/SEA market. Answers questions like "Where's the cheapest 4K TV in Singapore right now?" with actual live data.

Happy to contribute this as a community tool or provide a free API key for testing.

— Surf ([email protected])

extent analysis

TL;DR

To integrate BuyWhere with LangChain for shopping research use cases, utilize the provided API and example code to create a structured tool for searching live product prices in Singapore.

Guidance

  • Review the API documentation at https://buywhere.ai/developers/ to understand the available endpoints and parameters.
  • Replace "YOUR_API_KEY" in the example code with a valid API key to authenticate requests to the BuyWhere API.
  • Test the search_singapore_products function with different queries to ensure it returns the expected structured JSON data.
  • Consider contributing the BuyWhere tool to the LangChain community or contacting the author for a free API key for testing purposes.

Notes

The provided example code and API documentation should be sufficient for integrating BuyWhere with LangChain, but additional support or customization may be needed depending on specific use cases or requirements.

Recommendation

Apply workaround by using the provided example code and replacing "YOUR_API_KEY" with a valid API key to authenticate requests to the BuyWhere API. This approach allows for immediate testing and integration with LangChain.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

langchain - 💡(How to fix) Fix Community Tool: BuyWhere — real-time Singapore product catalog API for LangChain agents [1 comments, 2 participants]