Skip to content

Filters

filters

Filter types for /match and /search.

Two public types share a small private base so each endpoint method accepts only the filter shape that makes sense for it. extra="forbid" turns cross-endpoint typos (passing countries= to match(), etc.) into immediate pydantic.ValidationError.

Aliases for schema and filter exist because those names are reserved (Python builtin / Pydantic-sensitive); populate_by_name=True means callers can write either schema=... (the alias) or schema_=... (the Python field name) and both work.

MatchFilters

Bases: _CommonFilters

Filters accepted by client.match().

SearchFilters

Bases: _CommonFilters

Filters accepted by client.search().