query_resource_data
Fetch structured data rows from specific tabular files on France's open data platform using the Tabular API, retrieving up to 200 rows per query to analyze CSV or XLSX resources without downloading entire files.
Instructions
Query data from a specific resource (file) via the Tabular API.
The Tabular API is data.gouv.fr's API for parsing and querying the content of resources (files) on the platform. It allows you to access structured data from tabular files (CSV, XLSX, etc.) without downloading the entire file. This tool fetches rows from a specific resource using this API.
Each call retrieves up to 200 rows (the maximum allowed by the API).
Note: The Tabular API has size limits (CSV > 100 MB, XLSX > 12.5 MB are not supported). For larger files or unsupported formats, use download_and_parse_resource. You can use get_resource_info to check if a resource is available via Tabular API.
Recommended workflow:
Use search_datasets to find the appropriate dataset
Use list_dataset_resources to see available resources (files) in the dataset
(Optional) Use get_resource_info to verify Tabular API availability
Use query_resource_data with the chosen resource_id to fetch data
If the answer is not in the first page, use query_resource_data with page=2, page=3, etc.
Args: question: The question or description of what data you're looking for (for context) resource_id: Resource ID (use list_dataset_resources to find resource IDs) page: Page number to retrieve (default: 1). Use this to navigate through large datasets. Each page contains up to 200 rows.
Returns: Formatted text with the data found from the resource, including pagination info
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | ||
| resource_id | Yes | ||
| page | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |