MENU Menu

API Documentation

This page reviews the Data Portal's common endpoints for programmatically retrieving data in JSON format.

Note: The current API endpoints are under heavy development and are subject to change.

Endpoint Types

Endpoints are available in two main formats for raw data extraction: JSON and CSV. If you wish to query your data in CSV or downloadable JSON-file format, these requests may hit our CDN and may take longer to retrieve.

Retrieving the Data Portal's Table of Contents

To retrieve a summary list of all datasets, access the following endpoint: /api.

This endpoint contains the metadata for each table, and includes some of the following key information:

  • Dataset Name
  • Dataset Categorization (Level 1 to Level 6)
  • Dataset Description
  • Dataset Author
  • Dataset Source URL
  • Dataset Upload Date (Integer - Unixtime)
  • Dataset Original Date (String) - Original Date of Dataset, as recorded by source if available
  • Dataset Source
  • Dataset Source
  • Dataset Description

Retrieving a Raw Dataset from the Data Portal

1. CSV Endpoint - /csv/[[Dataset ID]]

To access the CSV endpoint, you can target a dataset (who's ID is in /api), at /csv/[[Dataset ID]].

Queries and query structures that apply to JSON endpoints also apply to CSV endpoints.

2. JSON Endpoint - /api/[[Dataset ID]]

To access a JSON endpoint, you can target a dataset (who's ID is in /api), at /api/[[Dataset ID]].

For both JSON and CSV endpoints, contents include:

  • Field Names
  • Field Values

Dataset Endpoint Queries

Currently unavailable, but you will be able to conduct the following queries on any given dataset:

  • Query only specific fields by field name
  • Query only specific fields by field value (ex: Datapoints only from the year 1970 for a given dataset)

Press Contact Us

© 2016 United States Common Sense. All Rights Reserved.