Build Diaries · 02 ·
Trend arbitrage across languages.
In English-speaking search, “Claude Code” is a daily topic. In Persian search, it’s invisible. That gap — between when a trend peaks in one market and reaches another — is content arbitrage. Here’s the system I built to detect it, across seven data sources, served to Claude as a remote MCP.
- APIs unified
- 7
- MCP tools exposed
- 24
- Farsi articles for “Claude Code”
- 0
01 · The idea
Wait for the trend — or catch it before it arrives.
Most content sites in non-English markets wait. Something trends in the US, eventually it ranks locally, and by then ten other sites have already covered it. The other path: detect the signal in the English-speaking source market, write the local-language article while competition is zero, sit on it until the trend crosses the border.
02 · The signal problem
Why one source of trend data is never enough.
Google Trends is the obvious starting point — and the wrong one. It’s a lagging indicator. By the time a topic shows up in Trends, the developer-first audience has been talking about it for weeks. Each source below catches a different part of the wave.
Lagging indicator. Great for news cycles. Weak for tech.
Daily Search Trends RSS exists and is free, no auth. Returns trending topics per country with approximate traffic and associated news articles. The catch: most of what trends are people and events, not concepts. The Iran feed on a normal day is celebrities and politics — useful for news-arbitrage, useless for “what tool will the developer audience be talking about in two months.”
- Latency
- ~24 hours
- Topic type
- News, people, events
- Best for
- Hot-news arbitrage
2-8 weeks ahead of Trends. Free API. No auth.
The Algolia HN Search API is one of the great free data sources of the internet. Every story, every comment, fully searchable, filterable by date and points. If a tool name has hit 50+ points on HN, it has crossed the developer-awareness threshold weeks before any keyword tool will notice.
- Latency
- Real-time
- Topic type
- Tools, papers, launches
- Best for
- Tech early signal
Star velocity is a leading indicator. 5000 req/hour with a free token.
Search repos with qualifiers — stars greater than X, created after a recent date, language equals Python. A new repo with 500+ stars in 30 days is a “next big thing” signal. The stargazers endpoint includes the timestamp of each star — derive a velocity curve without scraping.
- Latency
- Real-time
- Topic type
- Open-source projects
- Best for
- Tool adoption
The gap detector. Same article, two languages, two numbers.
Wikimedia Pageviews API is the underrated workhorse. For any article you can pull daily views per language project. The arbitrage signal: high English views, zero Farsi views, no Farsi article. That’s a gap with proof. Combine with the langlinks endpoint to see which languages even have an article.
- Latency
- ~24 hours
- Topic type
- Anything with an article
- Best for
- Cross-language gap proof
Best signal for SaaS and AI tool launches.
GraphQL API, free developer token. Posts filterable by date range, topic slug, vote count. The “artificial-intelligence” topic alone surfaces 10-30 launches per day. Most fail. The few that don’t are the ones to write about before the local-language audience hears the name.
- Latency
- Daily
- Topic type
- Product launches
- Best for
- SaaS / AI tools
The hard validation layer. Numbers don’t lie.
Download stats validate adoption claims. The Anthropic Python SDK shows 125 million monthly downloads — that’s not hype, that’s deployment. Pulling daily download series for a package tells you whether a “rising tool” actually has users or is just rising chatter.
- Latency
- Daily
- Topic type
- Library adoption
- Best for
- Truth-check
03 · The sources
Seven APIs behind one MCP server.
Each source covers one niche the others can’t. None of them, alone, is enough. Together they map the full lifecycle of an emerging topic — from developer chatter to product launch to public curiosity to organic search volume.
Source 01
Hacker News Algolia
The earliest signal for any tech topic. hn_search with min_points=50 and a date filter returns every front-page-worthy story in seconds. No auth, no rate limit you’ll ever hit.
Source 02
GitHub Search
github_search_repos with min_stars and created_after finds projects exploding right now. github_search_code measures real adoption of a library by counting actual import statements.
Source 03
Wikipedia Pageviews
The gap detector. wiki_compare_pageviews returns the same article’s view count across English, Persian, Arabic. Zero in Persian + rising in English = arbitrage window open.
Source 04
Product Hunt GraphQL
Daily product launches filtered by topic and vote count. The earliest signal for new SaaS/AI tools — most of which will fade, but a few become the names you should have ranked for last month.
04 · The first hit
“Claude Code” — by the numbers.
First sanity check after the MCP was running: ask it about the topic that started the whole project. Real numbers from gap_signal_check("Claude Code") against live APIs. Pick the Wikipedia state to see what verdict the heuristic returns.
Pick a scenario to see what the gap heuristic produces — and what we actually got for “Claude Code”.
EN views high FA article exists verdict: NEEDS_DEEPER_LOOK
If the target-language article already exists, the gap is closing. Maybe it still has low pageviews and you can still rank fast, but the easy-mode window has passed. The heuristic downgrades to “needs deeper look” — go check pageview velocity and SERP competition before deciding.
- Gap window
- Closing
- Action
- Validate by hand
- Priority
- Medium
EN views 3,372 in 30 days FA article: doesn’t exist verdict: MODERATE_FA
This is what we actually got. Wikipedia EN had 3,372 views in 30 days, Persian and Arabic Wikipedia have no article at all. HN had 100 stories with 20+ points starting April 2nd. GitHub had 139,269 repos referencing the term. The signal is clear, the gap is wide open, and the heuristic flags it for the Persian market specifically.
- EN views (30d)
- 3,372
- FA article
- Missing
- HN signal
- 100 stories
05 · From script to MCP
From a local script to a remote MCP server.
A Python script that calls seven APIs is just a script. To make it useful from claude.ai — without installing anything on your machine — you have to expose it as a remote MCP. That means switching from stdio transport to Streamable HTTP, adding CORS, hiding the endpoint behind nginx with a secret path. Toggle to see the shape of the change.
LOCAL · stdio only
mcp.run()— speaks stdio, only callable from local Claude Desktop / Code- No transport over HTTP, no URL to share
- Can’t connect from claude.ai web — there’s no endpoint to point at
- Tokens live in
.envfile on your laptop
REMOTE · Streamable HTTP + nginx
server.mcp.streamable_http_app()wrapped with CORS, served by uvicorn on 127.0.0.1:8094- Mount path is a secret:
/mcp/trend-gap-mG5q8HrG3Li...— acts as bearer token - nginx proxies the secret path to localhost;
proxy_buffering offis critical - Tokens injected by systemd unit; claude.ai connects with one URL
06 · The playbook
Build the same thing for your market. Seven steps.
If you do this for one language pair, it works for any. The signals are language-neutral; only the target Wikipedia project codes change. Checks are saved locally — tick what you’ve done.
0 / 7 complete
07 · Honest questions
About trend arbitrage and remote MCPs.
Five questions worth answering in writing. Each is in the FAQ schema for rich results.
What is trend arbitrage across languages?
Trend arbitrage exploits the lag between when a topic peaks in one search market (e.g., English) and reaches another (e.g., Persian or Arabic). You build content in the slower-arriving language while local competition is zero. When the trend arrives, your article is already indexed and ranked.
Why isn’t Google Trends enough to detect emerging trends?
Google Trends is a lagging indicator for evergreen tech topics. It reflects volume after broad audience awareness. For tool and concept names like Claude Code, Hacker News fires 2-8 weeks earlier, GitHub Search shows star velocity in real time, and Wikipedia pageviews catch the curiosity wave before it shows up in search volume.
Why use a custom MCP server instead of calling these APIs directly?
Wrapping seven APIs in one MCP server gives Claude a unified research surface. All filters exposed, sane defaults, one auth boundary. You can ask Claude to compare Wikipedia pageviews for a topic across English, Persian, and Arabic in one sentence instead of orchestrating seven HTTP calls by hand.
How do you make an MCP server reachable from claude.ai?
Run it over Streamable HTTP transport instead of stdio, expose it behind nginx with a secret URL path, and point claude.ai’s Custom MCP setting at the public URL. The secret path acts as a bearer token. Reverse-proxy buffering must be off, and CORS headers added at the wrapper level. Total config: ~20 lines of nginx and one systemd unit.
Does this work for any source-target language pair?
Yes. The underlying signals (HN, GitHub, Wikipedia, PyPI, npm, Product Hunt) are language-neutral. The gap detector compares Wikipedia pageviews across any project codes you pass: en.wikipedia, fr.wikipedia, tr.wikipedia, es.wikipedia. It generalizes to English-to-French, English-to-Turkish, or any pair where one market leads.
