How to Choose a Crawler Endpoint and Cut Crawl Costs

November 24, 2026

Diffbot crawls the web on its own and returns structured data — entity pages, article text, product records — rather than raw HTML. You call an API endpoint with a URL and get back JSON with fields already extracted.

The earlier article covered the Knowledge Graph API. This one covers the practical API mechanics: choosing between endpoints, writing extraction rules that survive redesigns, and controlling spend.

Which Diffbot endpoint fits your job?

Four do most of the work.

  • Analyze — one endpoint, auto-detects page type, returns article, product, discussion or image data. Best first call for unknown URLs.
  • Article — for news and blog content. Returns title, author, date, text, tags. Cheaper and more predictable than Analyze for a known corpus.
  • Product — price, availability, SKU, variants. Quality varies by site; e-commerce markup differs a lot.
  • Knowledge Graph — entity lookup by name or URL for organisations, people and products, with structured attributes.

Start with Analyze, then move to the specific endpoint once you know the page types. Specific endpoints cost less and produce fewer surprises.

When do you need custom extraction rules?

When the page has fields Diffbot’s defaults miss — a spec table on a niche site, a price inside a widget.

Custom rules target CSS selectors or XPath, and Diffbot merges them with the default extraction. This is the right tool for a small number of high-value sources.

The failure mode is brittleness. A selector like div.product > div:nth-child(3) > span breaks on the next redesign. Prefer stable anchors — IDs, data attributes, semantic markup — over positional selectors.

Test rules against ten sample URLs from the same site, not one. Sites render categories differently more often than you would think.

How do you keep crawl costs predictable?

Diffbot bills by API calls, and crawling a large site can burn calls fast because every page is a call.

Three controls. Set a per-job cap so a crawl cannot run away. Deduplicate URLs before crawling — the same article reached through four category paths gets fetched once. And cache extraction results; most news and product data does not change within a day, so a 24-hour cache is usually safe.

For repeated pulls of the same domains, a scheduled crawl with a defined URL list beats ad-hoc single-page calls both on cost and consistency.

What quality checks should run in production?

Store the raw page alongside the extracted record for a sample of URLs. When a field looks wrong, you need to see what the page actually said.

Track field-level null rates. A field that goes from 2% null to 40% null on a domain usually means the site changed, and the pattern is visible before anyone complains about bad data.

Validate types on ingest. A price extracted as a string with a currency symbol will quietly poison a numeric column.

When is Diffbot the wrong choice?

For a handful of pages a week. Manual copy-paste or a small scraper is cheaper and simpler.

For sites behind login walls or heavy anti-bot protection. That is not what the crawler is built for.

And where content is user-generated and unstructured enough that no schema fits — social posts and comments often return partial data no matter which tool crawls them.

Quick Summary

  • Diffbot returns structured JSON from web pages, not raw HTML.
  • Use Analyze first, then specific endpoints for known page types.
  • Custom rules should anchor on IDs and data attributes, not positional selectors.
  • Deduplicate URLs and cache 24 hours to keep call counts predictable.
  • Track null rates per field to catch site changes early.
Tags: