Building InsightTrack with SerpApi for the SerpApi India Hackathon A developer built InsightTrack, a tool that combines analytics traffic data with SerpApi SERP data to explain why a page's traffic changed, using deterministic attribution rules rather than letting an AI guess. The project, submitted for the SerpApi India Hackathon, exposes its functionality through MCP so AI agents can query ranking and traffic evidence, with the Gemini API handling natural-language interaction. The developer also factored API credit budgets into the product design, calculating that tracking 8 keywords daily costs roughly 240 searches per month. A few weeks ago, I was looking at a page whose traffic had suddenly dropped. The analytics told me exactly what happened: Traffic was down. But then I had the question that analytics couldn't answer: Why? Did the page lose its Google ranking? Did a competitor move above me? Did Google change the search results? Did an AI Overview start answering the query? My next step was usually pretty manual. I'd open Google, search the keyword, check my position, look at the competitors, and try to figure out what changed. That got me thinking: What if I could connect my traffic data with the search results automatically? That's how I started building InsightTrack . The idea behind InsightTrack is pretty simple. I already have one side of the story from my analytics: /guides/email-templates Last week: 1,240 visits This week: 719 visits Now I need the other side. What happened in Google? That's where SerpApi comes in. For the SerpApi India Hackathon, I'm integrating SerpApi with InsightTrack to collect SERP data and track how search visibility changes over time. For example: "free email templates" Last week: 3 This week: 9 Now the two pieces can be connected. Instead of simply saying: “Traffic dropped 42%.” InsightTrack can say: “Traffic dropped because the page moved from 3 to 9, while other websites moved above it.” That's a much more useful answer. This became one of the most important parts of the project. Imagine traffic drops by 30%, but the ranking stays exactly the same. A system that always needs to produce an explanation might blame search anyway. I didn't want that. InsightTrack uses deterministic rules to compare traffic and SERP changes. If the evidence points to a ranking change, it reports that. If a competitor moved above you, it can identify that. But if search didn't really change, it can say: “Search visibility didn't change enough to explain this. Check your referrers, campaigns, or recent deployment.” The goal isn't to always have an answer. The goal is to have an answer that can be explained. Suppose we have: Traffic: -42% Ranking: 3 → 9 Competitor: moved above us AI Overview: appeared InsightTrack combines those observations and produces a finding instead of making me investigate each piece manually. Under the hood, the attribution engine is just a pure function: traffic data + keyword findings → finding No database or API calls inside that layer. That makes it easy to test and, more importantly, makes the result reproducible. I also wanted this information to be accessible to AI agents. So InsightTrack exposes the same functionality through MCP . Now I can ask: “Who is ranking above me for ‘free email templates’, and why did they overtake me?” The Gemini API handles the natural-language interaction, while InsightTrack provides the underlying search and traffic data. The AI doesn't decide the attribution rules. It asks the tools for the evidence. One thing I underestimated was API usage. Every SERP check costs credits. If I have 8 keywords and check them every day, that's roughly: 8 × 30 = 240 searches/month So the search budget became part of the product design. Instead of making users calculate everything themselves, InsightTrack can work out a collection schedule based on their available credits. That was a good reminder that API limits aren't just infrastructure problems. They can affect the product itself. I want to make the search history more useful over longer periods, improve competitor tracking, and expand AI Overview monitoring. Because search is changing. A page can keep the same traditional ranking while the actual search experience around it changes dramatically. That's the gap I'm trying to explore with InsightTrack. Analytics tells you what changed. SerpApi tells you what changed in search. InsightTrack connects the two. Built for the SerpApi India Hackathon . 🔗 insightstrack.dev GitHub: github.com/NishikantaRay/InsightTrack Built with: SerpApi · PostgreSQL · DuckDB · Node.js · React · MCP · Gemini API