GnistAI GnistAI
Log in

Open Data (Government Portals)

Search over 460,000 government datasets across the US, UK, and Canada. Find public data on any topic from official open data portals — from health statistics to transportation records.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Government

Data source: CKAN Open Data Portals

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/opendata/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-opendata": {
      "url": "https://context.gnist.ai/mcp/opendata/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/opendata/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_datasets", "arguments": {"query": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/opendata/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/opendata/search_datasets?query=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/opendata/search_datasets",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "query": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc opendata

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

search_datasets
Search government open data datasets across US (data.gov), UK (data.gov.uk), or Canada (open.canada.ca).
ParameterTypeRequiredDescription
querystringrequiredSearch query for datasets (e.g. "climate change", "transportation safety", "public health spending").
portalstringoptionalPortal to search: 'us' (data.gov, 290K+ datasets), 'uk' (data.gov.uk, 55K+), 'ca' (open.canada.ca, 115K+). Default 'us'. (default: "us")
limitintegeroptionalNumber of results (1-50, default 20). (default: 20)
offsetintegeroptionalResult offset for pagination (default 0). (default: 0)
get_dataset
Get full details for a single government dataset by its name or ID.
ParameterTypeRequiredDescription
dataset_idstringrequiredDataset name or ID (e.g. 'annual-enterprise-survey-2021'). Found in search_datasets results.
portalstringoptionalPortal: 'us', 'uk', or 'ca'. Default 'us'. (default: "us")
list_organizations
List government organizations that publish open data on a portal.
ParameterTypeRequiredDescription
portalstringoptionalPortal: 'us', 'uk', or 'ca'. Default 'us'. (default: "us")
limitintegeroptionalNumber of results (1-50, default 20). (default: 20)
get_organization
Get details for a specific government data-publishing organization.
ParameterTypeRequiredDescription
org_idstringrequiredOrganization name or ID (e.g. 'nasa-gov', 'department-of-energy'). Found in list_organizations results.
portalstringoptionalPortal: 'us', 'uk', or 'ca'. Default 'us'. (default: "us")
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related