Overview

The Open Government India API (data.gov.in) provides access to thousands of datasets published by Indian government ministries and departments, covering agriculture, health, education, finance, and more. You need a free API key to make requests — sign up at https://data.gov.in/ to get started. It is one of the largest open government data platforms in Asia and a great resource for data-driven projects about India.

Beginner Tip

Get your free API key from your data.gov.in account dashboard, then include it as api-key=YOUR_API_KEY in the query string. Use the resource_id parameter with a dataset ID from the portal to fetch specific data.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

Use case: Integrate indian government open data data into web and mobile applications
Open Government, India data via REST API

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "status": "success",
  "data": {
    "result": "Data from Open Government, India",
    "description": "Indian Government Open Data",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

status Request status, typically ok when successful
total Total number of records available in the dataset
count Number of records returned in this response
records Array of data records from the requested dataset
fields Metadata describing each field name and type in the records

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://data.gov.in/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

403 Forbidden or Invalid API Key The api-key parameter is missing or the key has not been activated yet
Check your data.gov.in account email for an activation link, then copy the key exactly from the dashboard
Empty records array The offset or limit parameters exceed the dataset size
Start with limit=10&offset=0 to verify the dataset has records, then paginate from there
resource_id not found error Using a dataset page URL instead of the actual resource UUID
Open the dataset page on data.gov.in and copy the resource ID from the API tab, not the page URL

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Government
Difficulty Intermediate
Listing details not endpoint-verified

Similar APIs

View All →