Key Benefits
- Clean markdown extraction: Automatically filters out navigation, ads, and boilerplate to return only the main content, formatted as clean markdown.
- Flexible content modes: Choose between full text, query-relevant highlights, or LLM-generated summaries—or combine them in one request.
- Subpage crawling: Automatically discover and extract content from linked pages within a site, with targeted filtering to focus on specific sections.
Request Fields
Theids parameter (list of URLs) is required. All other fields are optional. See the API Reference for complete parameter specifications.
Content Extraction Options
Text
Returns the full page content as clean markdown.Highlights
Returns key excerpts from the page that are most relevant to your query. These are extractive (pulled directly from the source), not generated.Summary
Returns an LLM-generated abstract tailored to your specific query. Supports JSON schema for structured extraction.Token Efficiency
Choosing the right content mode can significantly reduce token usage while maintaining answer quality.
Use highlights for agentic workflows: When building multi-step agents that make repeated content extraction calls, highlights provide the most relevant excerpts without flooding context windows. Pass
highlights: true for the highest-quality default, or supply a custom query when you want to steer selection.
maxCharacters to cap token usage.
Content Freshness
Control whether to return cached content (faster) or fetch fresh content from the source usingmaxAgeHours.
Most use cases work well with the default (omit
maxAgeHours). Only set it when you have specific freshness requirements. If you do, pair with an explicit livecrawlTimeout (10000-15000ms).
Subpage Crawling
Automatically discover and extract content from linked pages within a website.subpages: Maximum number of subpages to crawl per URLsubpageTarget: Keywords to prioritize when selecting which subpages to crawl
- Start with a smaller
subpagesvalue (5-10) and increase if needed - Use specific
subpageTargetterms to focus on relevant sections - Combine with
maxAgeHoursfor fresh results
Example: Documentation Crawling
Example: Company Research
Error Handling
The Contents API returns detailed status information for each URL in thestatuses field. The endpoint only returns an error for internal issues—individual URL failures are reported per-URL.
CRAWL_NOT_FOUND: Content not found (404)CRAWL_TIMEOUT: The crawl timed out while fetching content (504)CRAWL_LIVECRAWL_TIMEOUT: Content could not be retrieved within your requestedlivecrawlTimeout(504)SOURCE_NOT_AVAILABLE: Access forbidden (403)CRAWL_UNKNOWN_ERROR: Other errors (500+)
statuses array to handle failures gracefully: