Documentation > Workflows & Code > Explore Metadata > IPUMS NHGIS Metadata

Explore IPUMS NHGIS Metadata

Below we provide examples in R, Python and curl showing how to work with our API to explore NHGIS metadata.

The Python and R examples are currently implemented using HTTP and JSON libraries to make and parse RESTful HTTP calls. As support for using the IPUMS API to interact with the NHGIS data collection is added to the SDKs, this documentation will be updated to utilize those libraries instead.

Get your key from https://account.ipums.org/api_keys. Make sure to replace 'MY_KEY' (all caps) in the snippet below with your key.

Load Libraries and Set Key

import requests
import json
from pprint import pprint

my_key = MY_KEY
# You have to install the httr and jsonlite libraries if they are not already installed.

library(httr)
library(jsonlite)
my_key <- MY_KEY
export KEY=MY_KEY # set the MY_KEY environment variable using bash shell

Usage of the IPUMS API will vary depending on whether you are requesting datasets or time series tables. See the following sections for next steps: