Valencia City Council’s Transparency and Open Data Portal, through OGoov, offers several REST API methods for accessing the data catalogue, to obtain all the information in a data set, its distributions and its georeferenced open data.
This API is implemented by CKAN. The following list includes some examples how to use the API:
- Simple data catalogue: http://apigobiernoabiertocatalog.valencia.es/api/3/action/package_list
- Extended data catalogue: http://apigobiernoabiertocatalog.valencia.es/api/3/action/package_search
- Groups (sectors) list: http://apigobiernoabiertocatalog.valencia.es/api/3/action/group_list
- Tags list: http://apigobiernoabiertocatalog.valencia.es/api/3/action/group_list/api/3/action/tag_list
- All information in a dataset: http://apigobiernoabiertocatalog.valencia.es/api/3/action/package_show?id=[id_distribucion]
All CKAN API REST documentation is available at the following address: http://docs.ckan.org/en/latest/api/index.html
Besides this CKAN API, the Real Time Open Data (RTOD) middleware, used to serve distributions with periodic updates, offers another API from which you can access both, the list of distributions and its data:
- List of available RTOD distributions: http://apigobiernoabiertortod.valencia.es/rest/collections.json
- Information on a particular distribution: http://apigobiernoabiertortod.valencia.es/rest/datasets/[id_distribucion].json. Example: http://apigobiernoabiertortod.valencia.es/rest/datasets/estado_trafico.json
Each distribution served by RTOD is available in RDF, HTML, JSON, N3, XML, TURTLE, CSV, ATOM and JSON-LD format, by simply changing the extension of the distribution in the URL (json in the example) by rdf, html, json, n3, xml, ttl, csv, atom and json-ld respectively.
Georeferenced Data API
You can also download the technical paper for reusers explaining the different Georeferenced Open Data API calls supplied by the City Council, grouped by a number of features such as:
About Me: Let’s get the three closest elements to the user’s position on the following points of interest, free public parking spaces, Valenbisi bicycle stations available or free terminals, containers, clothes, glass, solid waste items, battery, taxi, public wifi points and city traffic status in real time.
Points of interest: Gets the sights from a position and with a given radius of action grouped by themes such as municipal facilities, public transportation, Fallas and monuments.
To use the API geo-referenced data that can be requested credentials are needed Here