query(dataset, q, filters, facets, facet_size, date_facets, fields, embed, sort, ids, lang, page_no, page_size, previous_page_token, next_page_token, include_date_fields) → {Union[List[Dict[str, Any]], tuple[List[Dict[str, Any]], List[Dict[str, Any]]]]}
Query the API with filters, facets, sorting, and pagination.
Properties
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dataset | str | <optional> | '_all' | Dataset slug to query (default '_all'). |
q | str | <optional> | '' | Free-text search query string. |
filters | str | <optional> | '' | Filter expression (e.g. 'type:Person'). |
facets | str | <optional> | '' | Comma-separated facet field names. |
facet_size | int | <optional> | -1 | Number of facet values to return (default 10). |
date_facets | str | <optional> | '' | Date facet specification. |
fields | str | <optional> | '' | Comma-separated field names to include in results. |
embed | str | <optional> | '' | Embedding depth for related entities. |
sort | str | <optional> | '' | Sort expression (e.g. 'label:asc'). |
ids | str | <optional> | '' | Comma-separated entity IDs to fetch directly. |
lang | str | <optional> | 'all' | Language code for results (default 'all'). |
page_no | int | <optional> | -1 | Page number for offset-based pagination. |
page_size | int | <optional> | -1 | Number of results per page. |
previous_page_token | str | <optional> | '' | Token for cursor-based backward pagination. |
next_page_token | str | <optional> | '' | Token for cursor-based forward pagination. |
include_date_fields | bool | <optional> | False | Whether to include system date metadata. |
Returns:
A list of result dicts, or a (results, facets) tuple when facets are requested.
- Type
- Union[List[Dict[str, Any]], tuple[List[Dict[str, Any]], List[Dict[str, Any]]]]