Ever sat in front of your laptop and thought, "Would this product even work in Brazil?" or "Is there even a market for this gadget in UAE?" Yeah. Me too.
So I built something. An AI agent that does what I call market sense-making. You type in a product category (like "air purifiers" or "wireless earbuds") and a country (like Mexico, Japan, or Brazil), and the agent does all the heavy lifting:
- Searches on local Google — pulling first- and second-page results to understand what content is ranking.
- Visits top ecommerce sites in that country — Amazon, Mercado Livre, Flipkart, Noon, whatever’s relevant — and scrapes actual product listings.
- Estimates product popularity by looking at reviews, ratings, price points, and even special badges like "Amazon’s Choice" or "Best Seller." It’s like market research on-demand without needing to hire a consultant or wait two weeks.
Why Build This?
A lot of small businesses want to go global. But they don’t have the luxury of full-blown category reports from McKinsey. What they need is quick validation:
- Is this product already popular in that country?
- How competitive is it?
- What price range are we looking at?
Most tools are either too generic or cost thousands. I figured I’ll build a scrappy, AI-native version myself.
What the Agent Actually Does
You give it two inputs:
- A product category or sub-category
- A target market or country
And then the agent:
- Uses the localized Google domain (like google.com.br for Brazil, google.co.jp for Japan) to search for top-ranking content.
- Scrapes the ecommerce sites like Amazon, Shopee, Mercado Livre, etc., analyzing the first- and second-page listings.
- Grabs title, price, number of reviews, ratings, badges (like “Best Seller”), and extracts patterns.
- Estimates sales using a simple rule of thumb: 1 review = ~5–10 purchases. So if something has 100 reviews, you’re likely looking at 500–1000 unit sales. It's rough but useful for directional insights
How I Built It
Here’s what’s under the hood:
- Vibe Coding (Bolt.new) for front-end UI and prompt workflows
- phi.agent + GroqCloud running LLaMA 3 8B for reasoning
- Playwright + BeautifulSoup for browser automation + scraping
- Supabase for storing logs and country/product metadata
- Netlify for frontend deployment
And here’s a code snippet from the core agent logic:
from phi.agent import Agent
from phi.model.groq import Groq
from phi.tools.custom_tools import WebSearchTool, EcommerceScraperTool
agent = Agent(
model=Groq(id="llama3-8b-8192"),
tools=[WebSearchTool(), EcommerceScraperTool()],
description="Suggest best-selling items in a product category and market using local search and ecommerce analysis."
)
agent.print_response(
"What are the top-selling air purifiers in Brazil? Search Google Brazil and Amazon.br for results, and estimate sales volume.",
markdown=True,
stream=True
)
Region-Aware Google Search Tool
from serpapi import GoogleSearch
class WebSearchTool(Tool):
def run(self, query: str, country_code="br"):
params = {
"q": query,
"google_domain": f"google.com.{country_code}",
"api_key": os.getenv("SERPAPI_KEY"),
}
search = GoogleSearch(params)
return [r['title'] + " - " + r['link'] for r in search.get_dict().get('organic_results', [])[:10]]
Ecommerce Scraper Tool (Amazon.br Example)
import requests
from bs4 import BeautifulSoup
class EcommerceScraperTool(Tool):
def run(self, subcategory: str, country: str = "br"):
url = f"https://www.amazon.com.{country}/s?k={subcategory.replace(' ', '+')}"
headers = {"User-Agent": "Mozilla/5.0"}
soup = BeautifulSoup(requests.get(url, headers=headers).text, "html.parser")
results = []
for item in soup.select(".s-result-item")[:10]:
title = item.select_one("h2 span")
rating = item.select_one(".a-icon-alt")
reviews = item.select_one(".a-size-base")
if title and rating:
results.append(f"{title.text.strip()} | {rating.text.strip()} | Reviews: {reviews.text.strip() if reviews else 'N/A'}")
return results
Estimating Sales from Reviews
def estimate_sales_from_reviews(reviews):
try:
count = int(reviews.replace(",", ""))
return f"Estimated sales: {count * 7}"
except:
return "Sales estimate unavailable"
First Run: Real Examples
🇧🇷 Electronics in Brazil
- Searched "wireless earbuds"
- Amazon.br returned Xiaomi, JBL, and a few local knockoffs
- Items with 300–1000 reviews → ballpark sales: 2k–7k/month
🇯🇵 Kitchen Tools in Japan
- “Silent blender” and “no-splash juicer” kept showing up
- High review counts on compact multi-function units
🇦🇪 Beauty Products in UAE
- Amazon.ae showed lots of sponsored items
- Manual filtering helped find organic high-performers
What’s Next
- Add filters for low-competition, high-demand products
- Integrate with AdWords planner for search volume context
- Let sellers upload a product idea and run a fit check
- Build a dashboard to track trends across countries
Final Thought
This tool doesn’t replace deep market research, but it gets you 80% of the way there in 2 minutes. It’s meant for scrappy founders, sellers, and marketers who want to test fast and launch smart. You can bolt this onto your workflow or turn it into a browser-based SaaS for global product research. Let me know if you want to try it. Happy to open-source the agent or even walk through building your own version.