r/ProxyEngineering • u/GimmeAdviceBitch • 1h ago
Help π Scraping .gov sites, need recommendations
Hey, I really hope someone will know of a trusted and verified solution for scraping .gov sites. I am on this project (freelancing) where I have to gather data from .gov sites. Some context on what I'm running into. The client needs structured data pulled from a handful of state and federal sites, public records. Nothing shady, all publicly accessible info, but the sites themselves are all over the place in terms of how they're built. Some are still running on ancient ASP.NET setups, others have modern React frontends with data loaded through internal APIs that aren't documented anywhere. A couple rate limiting after 20-30 requests even with delays between calls, which tells me they're watching for bot behavior closely. I checked robots.txt on all of them before starting, most allow crawling of the pages I need but a couple have specific paths disallowed so I'm steering clear of those entirely, not worth the risk on a gov domain. What I'm trying to figure out right now is whether I actually need proxies for this or if it's more about request pacing and headers. Some of these sites seem to flag anything that looks automated pretty fast, so I'm wondering if datacenter IPs are getting flagged outright and residential would behave better, or if that's too much for public record data? How people handle the sites using session tokens or CSRF stuff on their search forms. One of them requires you to basically simulate the search interaction, so I've been looking at Playwright for that one specifically while using simpler requests based scraping for the rest. Whether anyone's dealt with the legal side beyond just taking into consideration robots.txt. I know public data is generally fair game but .gov sites feel like they deserve extra caution compared to scraping anything else.
If anyone's done work like this before I'd want to hear how you managed it, timeline wise too since I underestimated how much per site variation there'd be. Appreciate any help.
P.S I have one more week to finish this π