Inspiration

After seeing the vast number of webscrapers that SerpAPI provides, I realized that this was an opportunity to build a shopping interface, a travel website, even a unique web browser or research platform, without the effort of sourcing the data. However, these ideas I came up with all seemed "leverage AI" to do the same thing... Who wants to see yet another AI agent leverage MCP tools to perform enhanced search? So, instead, I flipped the idea on its head. What if I could make a game where humans race to compete against AI search? Better yet, what if I made a game where humans compete against each other to find obscure facts or shop for the best item? Introducing SCRAPR, where you're the webscraper, looking for obscure facts and shopping for the best products.

What it does

SCRAPR is a multiplayer game that is fully hosted online where users will join a lobby, select between a different settings (Question Difficulty, Re-using words in the prompt in search queries) and 2 different game modes: web search or shopping, and then play a game to find an answer as fast as possible. For search, this means Googling for the answer, trying to get as few searches and clicks and going as fast as possible to get the correct solution. For shopping mode, this means looking for the cheapest and highest quality item that matches the requested description. Be sure to move fast, because once 1 player is done, it starts a timer for everyone else to finish!

The entire game is a visual mock of google chrome in HTML, but remade by hand. It copies the exact details of what you would see in a normal google search.

Users can make their own profiles with a unique username and profile picture. By default, the game lasts for 3 rounds, but this is configurable to be 1, 3, 5, or 7 rounds. Similarly, the timer duration can be set, as well as a few other rules in the game.

Everything works within a single browser tab, without ever needing to leave the game itself. Essentially, I've rebuilt google search and google shopping within a game interface, tracking clicks, searches, word counts, and times, to game-ify the task.

How we built it

The game uses a client–server architecture for multiplayer. One central server (my laptop) hosts every game. The visual "host" of a lobby is just the player who created it, who can change settings and start the game, not a separate machine, but not the real owner. Clients load server-rendered HTML pages with a small amount of vanilla JavaScript. The JavaScript keeps the page current by polling JSON endpoints every 1.5–2 seconds (for example GET /api/games/) and by posting actions (answers, selections, searches, clicks) with a per-player token. Behind a single Flask application (served by gunicorn with one worker and eight threads, and published through a Cloudflare Tunnel) are two layers that run in the same process. The web layer handles every incoming HTTP request. It validates the request, enforces rate limits, checks that the game is actually running, and decides when to call SerpAPI. SerpAPI is used to surface web search, Google Shopping, and autocomplete, with results cached for ten minutes to conserve API credits. The web layer also serves the in-game page viewer, which fetches third-party pages server-side (with a browser-like TLS handshake and a guard against requests to private addresses) and serves a sandboxed copy. It routes game actions and polls to the game layer. The game layer keeps all game state in memory. That means rooms keyed by a five-character code, players, settings, scores, and event logs, plus one game engine per room (quiz or shopping) that defines that mode's rules and scoring. Scores are computed on the server from its own stored copy of the results, so a client can't submit its own prices or ratings. There is no continuously running game loop. Each engine is a state machine, and its timers (round limit, countdown, intermission) advance lazily whenever a request touches the game.

Challenges we ran into

Multiplayer was a big shift and decision, because earlier I wanted to do AI races, but got feedback that multiplayer was more fun. It was a huge architectural change. Getting the website to look good was big. Finally, debugging. AI can program, but it generates so many visual bugs. Play testing over and over until I found each one and resolved it took a significant amount of time, but it adds overall polish to the game. An example of this was failure to open up most websites within the tab at first. Although this still occurs sometimes, since there are websites that check for webscraper bots, it now works for 90% of the websites I programmatically polled.

Devpost & Videos were a challenge, I didn't realize how much time they'd take, the video is slightly sped up. Sorry about that judges!

Accomplishments that we're proud of

I did this entirely on my own. This is my first solo hack, and I didn't realize the immense work that it takes to pull of a project in a single day by yourself. The obvious time sinks are programming and brainstorming. But I've also had to demo, build the Devpost, make videos, and do all of this while still dropping everything for the food line and enjoy some moments with friends. It's honestly exhausting, and I have so much appreciation for my former teammates for the shear amount of work that they've done in the past.

I'm very proud of mocking Google Chrome so well. I'm also proud of building multiplayer functionality. I'm normally a robotics/AI person, so these front-end & SWE systems concepts were a bit new to me. I'm happy that the process went smoothly. I'm also happy with the polish I was able to provide the game. There aren't any glitches to hide, like with most of my past demos, or mocked work. This game is in production, fully.

What we learned

Game design, fast design loop, programming a complex system. I discuss above what the challenges and accomplishments are, and these are my primary learnings too.

What's next for SCRAPR

Adding real security checks before hosting it fully on the internet Rerouting from a locally hosted server (my laptop with cloudflare tunnel) onto a long running server with an EC2 instance

Built With

Share this project:

Updates

Submission history