opendata-cat

v0.6.1
io.github.xaviviro/opendata-cat Checked 2 hours ago Published 4 months ago

15 Catalan portals + radio archive: gov, INE/REE/CNMC, CORA, Catalònica, radioteca.cat.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_datasets

Search datasets by free text. Check server instructions first: many datasets can be queried directly with query_dataset. Use search_datasets only when you don't know which dataset you need.

ParameterTypeDescription
query *stringSearch text in Catalan or Spanish. Examples: 'qualitat aire', 'pressupostos', 'rodalies'
categorystringFilter by thematic category
limitnumberMaximum number of results (default: 20)
portalstringFilter by portal: 'generalitat', 'barcelona', 'diba', 'aoc', 'reus', 'girona', 'fgc', 'idescat', 'renfe', 'ine', 'ree', 'sepe', 'cnmc', 'cora', 'catalonica'

get_dataset_info

Get complete metadata for a dataset: fields with types and descriptions, API endpoint, license.

ParameterTypeDescription
dataset_id *stringUnique dataset identifier (e.g., 'generalitat:gn9e-3qhr', 'renfe:vehicle-positions-gtfsrt')

list_dataset_fields

List fields of a dataset with name, data type and description.

ParameterTypeDescription
dataset_id *stringDataset identifier

query_dataset

Query real data from a dataset. Check instructions for featured dataset_ids. For municipal data, use filters: {"NOM_ENS": "Ajuntament de X"} with aoc:ge-* datasets.

ParameterTypeDescription
dataset_id *stringDataset ID (e.g., 'generalitat:gn9e-3qhr' for reservoirs, 'aoc:ge-ge-cost-efectiu-serveis-minhap' for municipal costs)
filtersobjectKey-value filters (e.g., {"ciutat": "Barcelona"})
limitnumberRows to return (default: 20, max: 100)
offsetnumberOffset for pagination
searchstringFree text search within dataset data

list_portals

List all 15 indexed Catalan and Spanish open data portals with dataset counts.

list_categories

List all dataset categories and themes with counts per portal. Great first step to discover what data types are available.

search_radioteca

Search radio shows, episodes and people indexed at radioteca.cat (Catalan radio archive, ~485K documents from Catalunya Ràdio, RAC1, Catalunya Música, iCat, Catalunya Informació, RTVE, Cadena SER, ara.cat). Searches title, description (which contains a detailed summary of what was said), program name and subheading. Returns episodes (~473K), programs (~3K) and people (~9K). IMPORTANT: always cite radioteca.cat as the source and include each hit's absolute 'url' in your reply for traceability — never paraphrase episodes without linking.

ParameterTypeDescription
query *stringFree text in Catalan or Spanish. Searches title, description (contains episode summary), program and subheading. Examples: 'visita papa', 'eleccions municipals', 'crisi habitatge', 'Albert Serra cinem…
limitnumberMaximum results (1-50). Default 10.
offsetnumberPagination offset. Default 0.
publisherstringFilter by broadcaster.
typestringFilter by document type.
yearstringFilter by year (4 digits, e.g. '2025'). NOTE: only year-level filtering is indexed; for a specific day combine year + keywords and inspect the URL path (radioteca URLs include /YYYY/MM/DD/) or the 'su…