CKAN Data API

Access resource data via a web API with powerful query support. Further information in the main CKAN Data API and DataStore documentation.

Endpoints »

The Data API can be accessed via the following actions of the CKAN action API.

Create https://datos.ine.gob.gt/en/api/3/action/datastore_create
Update / Insert https://datos.ine.gob.gt/en/api/3/action/datastore_upsert
Query https://datos.ine.gob.gt/en/api/3/action/datastore_search
Query (via SQL) https://datos.ine.gob.gt/en/api/3/action/datastore_search_sql
Querying »
Query example (first 5 results)

https://datos.ine.gob.gt/en/api/3/action/datastore_search?limit=5&resource_id=696d62a9-faa7-4d14-9330-18052d6e0abf

Query example (results containing 'jones')

https://datos.ine.gob.gt/en/api/3/action/datastore_search?q=jones&resource_id=696d62a9-faa7-4d14-9330-18052d6e0abf

Query example (via SQL statement)

https://datos.ine.gob.gt/en/api/3/action/datastore_search_sql?sql=SELECT * from "696d62a9-faa7-4d14-9330-18052d6e0abf" WHERE title LIKE 'jones'

Example: Javascript »

A simple ajax (JSONP) request to the data API using jQuery.

        var data = {
          resource_id: '696d62a9-faa7-4d14-9330-18052d6e0abf', // the resource id
          limit: 5, // get 5 results
          q: 'jones' // query for 'jones'
        };
        $.ajax({
          url: 'https://datos.ine.gob.gt/en/api/3/action/datastore_search',
          data: data,
          dataType: 'jsonp',
          success: function(data) {
            alert('Total results found: ' + data.result.total)
          }
        });
Example: Python »
      import urllib
      url = 'https://datos.ine.gob.gt/en/api/3/action/datastore_search?limit=5&resource_id=696d62a9-faa7-4d14-9330-18052d6e0abf&q=title:jones'  
      fileobj = urllib.urlopen(url)
      print fileobj.read()