← Back to Posts
Food delivery spending tracker

How I Built a Chrome Extension to Track Your Swiggy Spending (3000+ Users)

chrome-extension swiggy react typescript reverse-engineering

Ever wondered how much you’ve actually spent on Swiggy? I built a Chrome extension that answers that question. It now has 3,000+ active users.

The Idea

Swiggy doesn’t show you a “total spent” number anywhere. You can scroll through orders forever, but there’s no summary. I wanted to know my damage, so I built something to find out.

Finding the API

First step: open DevTools on Swiggy’s order history page and watch what loads.

Found it https://www.swiggy.com/dapi/order/all

Easy enough. But here’s where it got interesting.

Down the Rabbit Hole

I scrolled down the order history page to load more orders. Another network request fired. Same endpoint, but this time with a weird query parameter:

/dapi/order/all?order_id=284719283

What’s that number? It looked random at first. But I kept scrolling, watching each request. The number changed every time and it was always different.

Then I spotted it.

That “random” number was the order_id of the last order in the previous batch. Swiggy uses cursor-based pagination. To get the next page, you pass the last order ID you received.

Once I figured that out, the whole thing clicked. I could write a loop:

  1. Fetch orders
  2. Grab the last order_id from the response
  3. Use it to fetch the next batch
  4. Repeat until empty

The 1-Year Surprise

I let my loop run, expecting to see orders from years ago. But it stopped after about a year of data.

Turns out Swiggy only exposes ~1 year of order history through this endpoint. If you’ve been ordering since 2019, tough luck you’ll only see the last 12 months.

I only discovered this by actually hitting the wall. No documentation, no error message. Just… no more orders.

The Loop

The extension sits in a loop:

  1. Fetch a batch of orders
  2. Store them
  3. Use the last order ID to get the next batch
  4. Repeat until empty

Show progress to the user (“247 orders fetched…”) so they know it’s working.

Crunching Numbers

Once we have all orders, the fun part:

Separate delivered orders from cancelled ones so the total is accurate.

Privacy First

No backend. No data collection. Everything runs in your browser. Your order history never leaves your machine.

This was non-negotiable. People trust the extension because it’s transparent.

The Result

3000+ users who’ve collectively confronted some uncomfortable truths. The reactions are always fun people discover they’ve spent ₹80,000+ on food delivery in a year.

Bonus: It also works for Blinkit grocery tracking.

Try It

Install it directly from the Chrome Web Store:

👉 Get the Extension

Or check out the source code:

🔗 GitHub Repository


Questions? Want to build something similar? Reach out.