api.data.gov Dataset API

The Dataset API from api.data.gov — 1 operation(s) for dataset.

Operations 1

GET /api/dataset/{slug_or_id} gets a single document based on the dataset slug name or dataset id #

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-data-gov:api-data-gov-dataset-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-data-gov-dataset-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Datagov Catalog Dataset API
  version: 0.1.0
servers:
- url: https://catalog.data.gov
tags:
- name: Dataset
paths:
  /api/dataset/{slug_or_id}:
    get:
      description: Get a single opensearch document based on slug name
      parameters:
      - in: path
        name: slug_or_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResults'
          description: Successful response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
      summary: gets a single document based on the dataset slug name or dataset id
      tags:
      - Dataset
      operationId: getApiDatasetBySlugOrId
      x-operation-id-source: derived
components:
  schemas:
    HTTPError:
      properties:
        detail:
          type: object
        message:
          type: string
      type: object
    Dataset:
      additionalProperties: false
      properties:
        _score:
          type: number
        _sort:
          items: {}
          type: array
        access_level:
          type: string
        dcat:
          additionalProperties: {}
          type: object
        description:
          type: string
        harvest_record:
          format: url
          type: string
        harvest_record_raw:
          format: url
          type: string
        harvest_record_transformed:
          format: url
          type: string
        has_download:
          type: boolean
        has_spatial:
          type: boolean
        identifier:
          type: string
        keyword:
          items:
            type: string
          type: array
        last_harvested_date:
          format: date
          type: string
        organization:
          $ref: '#/components/schemas/Organization'
        popularity:
          type: integer
        publisher:
          type: string
        slug:
          type: string
      type: object
    SearchResults:
      additionalProperties: false
      properties:
        after:
          type: string
        results:
          items:
            $ref: '#/components/schemas/Dataset'
          type: array
        sort:
          enum:
          - relevance
          - popularity
          - distance
          - last_harvested_date
          type: string
      required:
      - results
      - sort
      type: object
    Organization:
      additionalProperties: false
      properties:
        aliases:
          items:
            type: string
          type: array
        description:
          type: string
        id:
          format: uuid
          type: string
        logo:
          format: url
          type: string
        name:
          type: string
        organization_type:
          enum:
          - Federal Government
          - City Government
          - State Government
          - County Government
          - University
          - Tribal
          - Non-Profit
          type: string
        slug:
          type: string
      type: object