I've rebuilt this little widget several times by now. Enough times from long enough ago that I don't even remember now where I initially reverse engineered the services that enable it to function. Probably the Delaware legislature's website since they also have a "find my legislator" widget on there.
The concept is simple enough. Put in your address (in Delaware) and it spits out your legislators. Under the hood it starts by geo-locating your address into a lat/lon which then gets fed into a separate service that looks up the districts you're a part of using different URL parameters on a single delaware.gov endpoint for your Election District, Representative District, Senate District, and County [Council] District.
I take it a step further and follow the URL provided for the state legislators to their legislative profiles and scrape the email address and photo to include in the output.
It's not overly complicated, but in the course of writing code for local political parties it's something that has often been useful or at least cool looking. I've done it so many times that this particular rewrite, with the benefit of VS Code's LLM-driven auto completion, was done in a couple of hours and uses Next.js, Tailwind, and all the other newfangled fanciness.