Build an agent that checks for website contradictions
Using Firecrawl and Claude to scrape your website’s data and look for contradictions
Note: this example is using v0 version of the Firecrawl API. You can install the 0.0.20 version for the Python SDK or the 0.0.36 for the Node SDK.
In this quick tutorial you will learn how to use Firecrawl and Claude to scrape your website’s data and look for contradictions and inconsistencies in a few lines of code. When you are shipping fast, data is bound to get stale, with Firecrawl and LLMs you can make sure your public web data is always consistent! We will be using Opus’s huge 200k context window and Firecrawl’s parellization, making this process accurate and fast.
Setup
Install our python dependencies, including anthropic and firecrawl-py.
Getting your Claude and Firecrawl API Keys
To use Claude Opus and Firecrawl, you will need to get your API keys. You can get your Anthropic API key from here and your Firecrawl API key from here.
Load website with Firecrawl
To be able to get all the data from our website page put it into an easy to read format for the LLM, we will use Firecrawl. It handles by-passing JS-blocked websites, extracting the main content, and outputting in a LLM-readable format for increased accuracy.
Here is how we will scrape a website url using Firecrawl-py
With all of the web data we want scraped and in a clean format, we can move onto the next step.
Combination and Generation
Now that we have the website data, let’s pair up every page and run every combination through Opus for analysis.
That’s about it!
You have now built an agent that looks at your website and spots any inconsistencies it might have.
If you have any questions or need help, feel free to reach out to us at Firecrawl.