firecrawl/firecrawl · error · ValueError

highlights format must be an object with 'type' and 'query'

Error message

highlights format must be an object with 'type' and 'query' fields

What it means

Error "highlights format must be an object with 'type' and 'query' fields" thrown in firecrawl/firecrawl.

Source

Thrown at apps/python-sdk/firecrawl/v2/utils/validation.py:481

    return format_obj


def _validate_question_format(format_obj: Any) -> Dict[str, Any]:
    """Validate and prepare question format object."""
    if not isinstance(format_obj, dict):
        raise ValueError("question format must be an object with 'type' and 'question' fields")

    if not isinstance(format_obj.get('question'), str) or not format_obj['question'].strip():
        raise ValueError("question format requires a non-empty 'question' string")

    return format_obj


def _validate_highlights_format(format_obj: Any) -> Dict[str, Any]:
    """Validate and prepare highlights format object."""
    if not isinstance(format_obj, dict):
        raise ValueError("highlights format must be an object with 'type' and 'query' fields")

    if not isinstance(format_obj.get('query'), str) or not format_obj['query'].strip():
        raise ValueError("highlights format requires a non-empty 'query' string")

    return format_obj


def validate_scrape_options(options: Optional[ScrapeOptions]) -> Optional[ScrapeOptions]:
    """
    Validate and normalize scrape options.
    
    Args:
        options: Scraping options to validate
        
    Returns:
        Validated options or None
        
    Raises:

View on GitHub (pinned to 656bffcc28)

When it happens

Trigger: Thrown at apps/python-sdk/firecrawl/v2/utils/validation.py:481 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of firecrawl/firecrawl@656bffcc28 (2026-08-12). Data as JSON: /api/errors/813d00d309b547ff. Report an issue: GitHub.