Inspiration

I was standing in a gas station staring at a wall of scratch-off tickets wondering if the $100 one was actually worth buying vs 20 5-dollar ones. Observation told me the the frequent flyers opted for the pricier tickets vs volume, but I wanted the data.

Official state lottery websites bury the odds in 100 individual pages and don't usually publish the amount sold to date. There are a couple 3rd party sources but they weren't calculating current expected value, only the EV at game start. Plus there's no time to run a bunch of calculations when the mom behind you in line just needs her Diet Dr. Pepper. I wanted a tool that quickly answered the question: which ticket is most worth it?

What it does

Scratch Scout lets you point your phone at the scratch-off display at any retailer and instantly see the expected value for every ticket on the wall via our tool we call LottoLens AI. It scrapes live prize data directly from state lottery websites, calculates the real expected return per dollar spent, and ranks every active game. Also it allows players to set a budget so they can make an informed decision before they buy. The photo recognition flow uses Gemini Vision to identify game names and numbers from the display, then looks them up against fresh odds data stored in AWS DynamoDB.

How we built it

v1 was a single HTML scraper for Texas Lottery data. For this hackathon we rebuilt the data layer on AWS DynamoDB and moved the frontend to Vercel. The stack is React/Vite on Vercel, with serverless API routes that read and write to a DynamoDB table keyed by state: one item per state, games stored as a JSON attribute, reads are a single GetItem call. A suite of state-specific scrapers (TX, FL, CA, NY, GA, NJ, AZ, OR and more) run daily via GitHub Actions and ingest fresh prize data via a gated /api/ingest-games endpoint. The photo ID feature sends an image to Gemini 2.5 Flash, parses the structured response, and matches identified games against the live DynamoDB data.

Challenges we ran into

State lottery websites do not want to be scraped. Every state has a different HTML structure, several block automated requests with 403s, and none of them expose a public API. Minnesota publishes game lists but doesn't publish prize breakdowns. Illinois actively blocks requests mid-session. A lot of the scraper work is just fighting defensive website design to get data that should be public.

Accomplishments that we're proud of

The AI + OCR identification works surprisingly well in real retail conditions: mixed lighting, angled shots, partially obscured tickets. Gemini returns structured game numbers and names reliably enough that the match rate against the database is high. The full flow from photo to ranked expected values takes around 3 seconds.

What we learned

DynamoDB's schemaless model is a great fit for this data. Every state's game object looks slightly different, and forcing it into a relational schema would have been painful. Storing one item per state with a games array means reads are a single GetItem call regardless of how many games a state has.

What's next for Scratch Scout

Retail partnerships - Partner with scratch-off display manufacturers like LOTV/ADMS and LottoShield to get Scratch Scout branding on the machines themselves. Users scanning a display are already the perfect audience; display companies get a lead generation channel from retailer foot traffic data in stores that they haven't sold yet which we can surface from user sightings.

Community - Let users share wins and losses via WeScratch, a Scratch Scout Pro social layer. WeScratch will be a paid feature inside Scratch Scout. Scan tickets with the free app, share and follow other players with a subscription. A social layer built around transparency is something no lottery app has tried.

Other Monetization - Pro features may include also unlimited Lotto Lens AI scans, multiple states, win/loss tracking et c.

AdSense display ads and affiliate links for responsible gaming resources and financial tools (budgeting apps, savings accounts). The user who just learned their $50 ticket had an $11 expected value is a good candidate for a high-yield savings account or Robin Hood ad.

Built With

Share this project:

Updates