How to scrape a website with Claude
Tested · How we test
Based on our test of 12 open source tools on 26 public sites, from one machine with no proxy.
The steps
- Look up your site. Its page here says whether you need a browser and which tool got it, with the code. See every site we tested.
- Give Claude that code and the fields you want. The prompt below works as a starting point.
- Run the code yourself and check the content. Search the result for a value you can see on the site. In our test, 50 pages answered HTTP 200 without the content, and code that only checks the status will not notice.
- If the page comes back empty, say so. Ask Claude to switch to the browser tool the site's page lists, rather than to tweak headers.
A prompt to start from
I want to scrape <the page address>. I need these fields: <for example, job title, company and location>. In a public test, <tool> got this page. Here is the code that worked: <paste the code from the site's ScrapingEvals page> Extend it to pull out the fields I need and save them as CSV. If a field is missing from the HTML, tell me instead of guessing.
What Claude cannot fix
When a site turns every tool away, better code does not help. On 5 sites in our test, every tool was refused or got a page without the content. Those sites need a different network address, through a proxy or a paid scraping API, which we have not tested yet.