firecrawl/firecrawl · error · ValueError

Invalid source type: {source.type}. Valid types: {valid_sour

Error message

Invalid source type: {source.type}. Valid types: {valid_sources}

What it means

Error "Invalid source type: {source.type}. Valid types: {valid_sources}" thrown in firecrawl/firecrawl.

Source

Thrown at apps/python-sdk/firecrawl/v2/methods/aio/search.py:121

            raise ValueError("Limit must be positive")
        if request.limit > 100:
            raise ValueError("Limit cannot exceed 100")

    if request.timeout is not None:
        if request.timeout <= 0:
            raise ValueError("Timeout must be positive")
        if request.timeout > 300000:
            raise ValueError("Timeout cannot exceed 300000ms (5 minutes)")

    if request.sources is not None:
        valid_sources = {"web", "news", "images"}
        for source in request.sources:
            if isinstance(source, str):
                if source not in valid_sources:
                    raise ValueError(f"Invalid source type: {source}. Valid types: {valid_sources}")
            elif hasattr(source, 'type'):
                if source.type not in valid_sources:
                    raise ValueError(f"Invalid source type: {source.type}. Valid types: {valid_sources}")

    if request.include_domains and request.exclude_domains:
        raise ValueError(
            "include_domains and exclude_domains cannot both be specified"
        )

    if request.location is not None:
        if not isinstance(request.location, str) or len(request.location.strip()) == 0:
            raise ValueError("Location must be a non-empty string")

    if request.tbs is not None:
        if not isinstance(request.tbs, str) or len(request.tbs.strip()) == 0:
            raise ValueError("tbs must be a non-empty string")

    if request.scrape_options is not None:
        validate_scrape_options(request.scrape_options)

    return request

View on GitHub (pinned to 656bffcc28)

When it happens

Trigger: Thrown at apps/python-sdk/firecrawl/v2/methods/aio/search.py:121 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/b92e62b4a993d02e. Report an issue: GitHub.