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:
- Fetch orders
- Grab the last
order_idfrom the response - Use it to fetch the next batch
- 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:
- Fetch a batch of orders
- Store them
- Use the last order ID to get the next batch
- 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:
- Total spent sum of all delivered orders
- Most ordered restaurant frequency count
- Highest single order the shameful one
- Oldest order how long you’ve been at this
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:
Or check out the source code:
Questions? Want to build something similar? Reach out.