How to Keep AI Product Photos Consistent Across a Catalog
Firecrawl is an API that takes a URL and returns cleaned Markdown, so you do not have to fight navigation menus, cookie banners, and footers yourself. One scrape call handles a single page. A crawl call walks a site up to a limit you set. Everything returns JSON with Markdown, HTML, links, and optional screenshots.
What does a Firecrawl scrape call return?
It returns a JSON object per page with a markdown field, a links array, and metadata including title and status code. Markdown is the default format, and that is what most RAG and agent pipelines want.
You get a free tier of a few hundred scrapes to test, then paid plans priced per credit. A single page scrape is roughly one credit; crawls multiply that by page count.
Step 1: Get an API key and send the first request
Sign up, copy the key, then:
curl -s -X POST https://api.firecrawl.dev/v1/scrape \
-H "Authorization: Bearer $FIRECRAWL_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/pricing","formats":["markdown"]}'
Response fields to look at first: success, data.markdown, data.metadata.title. If markdown comes back empty while success is true, the page is probably client-side rendered and needs the wait option.
Step 2: Add a wait for JavaScript pages
Many marketing sites render prices with JavaScript. Firecrawl has a waitFor parameter in milliseconds.
Set waitFor to 3000 for a typical page. If the content is still missing, try the actions parameter and scroll once. Do not set waitFor to 30 seconds out of habit, because that multiplies your crawl time across hundreds of pages.
Step 3: Use crawl for whole sections, with limits
The crawl endpoint takes a start URL and follows links. Always set limit and includePaths.
- limit: 200 max pages for a first run
- includePaths: [“^/blog/.*”] to stay in one section
- excludePaths: [“^/tag/.“, “^/author/.“] to skip thin pages
Without includePaths, a crawl of a docs site will happily spend credits re-scraping pagination and login pages.
Step 4: Return markdown only, not everything
If you only need text for embeddings, request formats [“markdown”] and skip html and screenshot. The html field can triple response size and slow your pipeline without adding value.
For structured data, use the extract option with a small JSON schema. Asking for five fields works. Asking for thirty fields returns half of them as null.
Step 5: Deduplicate before you embed
Firecrawl returns links for every page. Store a URL hash and skip anything you already have. Versioned docs sites change one line and regenerate every page, so a naive re-crawl re-embeds thousands of nearly identical chunks.
A cheap check: hash the markdown text itself, not the URL. Identical text means you can skip the embed call and the storage cost.
What Firecrawl is bad at
Heavy JavaScript apps with auth walls will fail. PDFs are handled but layout fidelity in tables is uneven. Very large sites hit your plan’s rate limits, and the crawl can take minutes rather than seconds, so it belongs in a background job rather than a request handler.
Also, markdown output keeps boilerplate from time to time. Check a sample of ten pages before you trust the corpus.
Who this is for
This setup suits developers building RAG over documentation, competitive price monitoring, and agent tools that need live page content. It does not suit non-technical users who want a spreadsheet of scraped data, because there is no visual builder. Look at a no-code scraper for that.
Quick Summary
- Firecrawl returns cleaned Markdown from a URL in one POST request.
- Use waitFor around 3000ms for JavaScript-rendered pricing pages.
- Always set limit and includePaths on crawl calls or credits disappear on junk pages.
- Request markdown alone for embeddings; add html only when you need markup.
- The extract schema should stay small, five fields or fewer.
Before you pick a plan, the Firecrawl page lists credit counts and rate limits per tier.
