Skip to main content
POST
/
api
/
datagov
/
datasets
/
search
/datagov/datasets/search
curl --request POST \
  --url https://api.anysite.io/api/datagov/datasets/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "q": "",
  "sort": "relevance",
  "org_slug": "census",
  "publisher": "U.S. Geological Survey",
  "keyword": "climate",
  "spatial_filter": ""
}
'
[
  {
    "alias": "<string>",
    "@type": "@datagov_dataset",
    "title": "<string>",
    "description": "<string>",
    "identifier": "<string>",
    "access_level": "<string>",
    "license": "<string>",
    "rights": "<string>",
    "issued": "<string>",
    "modified": "<string>",
    "temporal": "<string>",
    "accrual_periodicity": "<string>",
    "last_harvested_date": "<string>",
    "landing_page": "<string>",
    "publisher": "<string>",
    "bureau_code": [],
    "program_code": [],
    "language": [],
    "keywords": [],
    "themes": [],
    "spatial": "<string>",
    "has_spatial": false,
    "popularity": 123,
    "data_quality": true,
    "is_part_of": "<string>",
    "harvest_record_url": "<string>",
    "contact_point": {
      "@type": "@datagov_contact_point",
      "name": "<string>",
      "email": "<string>"
    },
    "organization": {
      "@type": "@datagov_dataset_organization",
      "id": "<string>",
      "alias": "<string>",
      "name": "<string>",
      "organization_type": "<string>",
      "image": "<string>",
      "description": "<string>",
      "aliases": []
    },
    "distributions": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Number of datasets to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
q
string
default:""

Full-text search query over the dataset catalog

sort
enum<string>
default:relevance

Result ordering

Available options:
relevance,
popularity,
last_harvested_date
org_type
enum<string> | null

Filter by publishing organization type

Available options:
Federal Government,
State Government,
County Government,
City Government,
Tribal,
Non-Profit,
University
org_slug
string | null

Filter by organization slug

Example:

"census"

publisher
string | null

Filter by exact publisher name

Example:

"U.S. Geological Survey"

keyword
string | null

Filter by exact keyword

Example:

"climate"

spatial_filter
enum<string>
default:""

Restrict to geospatial or non-geospatial datasets

Available options:
,
geospatial,
non-geospatial

Response

Successful Response

alias
string
required
@type
string
default:@datagov_dataset
title
string | null
description
string | null
identifier
string | null
access_level
string | null
license
string | null
rights
string | null
issued
string | null
modified
string | null
temporal
string | null
accrual_periodicity
string | null
last_harvested_date
string | null
landing_page
string | null
publisher
string | null
bureau_code
string[]
program_code
string[]
language
string[]
keywords
string[]
themes
string[]
spatial
string | null
has_spatial
boolean
default:false
popularity
integer | null
data_quality
boolean | null
is_part_of
string | null
harvest_record_url
string | null
contact_point
DatagovContactPoint · object
organization
DatagovDatasetOrganization · object
distributions
DatagovDistribution · object[]