skills/43-wentorai-research-plugins/skills/domains/social-science/ipums-microdata-api/SKILL.md
Access harmonized census and survey microdata via the IPUMS API
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research ipums-microdata-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
IPUMS (Integrated Public Use Microdata Series) provides the world's largest collection of harmonized census and survey microdata. Hosted by the University of Minnesota, it covers demographic, health, labor, and geographic data across 100+ countries and 100+ years. The API enables programmatic extract creation, metadata queries, and data retrieval. Free registration required.
| Collection | Coverage | Records | |-----------|----------|---------| | IPUMS USA | U.S. Census & ACS (1850-present) | 16B+ person-records | | IPUMS CPS | Current Population Survey (1962-present) | Labor force data | | IPUMS International | Census data from 100+ countries | 2B+ person-records | | IPUMS NHGIS | U.S. geographic/aggregate data | County-level stats | | IPUMS DHS | Demographic and Health Surveys | 300+ surveys, 90 countries | | IPUMS Time Use | American Time Use Survey | Time diary data | | IPUMS Health | NHIS health surveys | Health/disability data | | IPUMS Higher Ed | NSCG/SDR science workforce | S&E workforce data |
https://api.ipums.org/extracts/
# Register at https://www.ipums.org/
# API key from your account settings
export IPUMS_KEY="..."
# Request a data extract (IPUMS USA example)
curl -X POST "https://api.ipums.org/extracts/?collection=usa&version=2" \
-H "Authorization: $IPUMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Income by education, 2020 ACS",
"data_structure": {"rectangular": {"on": "P"}},
"data_format": "csv",
"samples": {"us2020a": {}},
"variables": {
"AGE": {},
"SEX": {},
"RACE": {},
"EDUC": {},
"INCTOT": {},
"EMPSTAT": {}
}
}'
curl "https://api.ipums.org/extracts/42?collection=usa&version=2" \
-H "Authorization: $IPUMS_KEY"
# When status is "completed"
curl -O "https://api.ipums.org/extracts/42/download?collection=usa&version=2" \
-H "Authorization: $IPUMS_KEY"
# List available variables
curl "https://api.ipums.org/metadata/usa/variables?version=2" \
-H "Authorization: $IPUMS_KEY"
# Get variable details
curl "https://api.ipums.org/metadata/usa/variables/EDUC?version=2" \
-H "Authorization: $IPUMS_KEY"
# List available samples
curl "https://api.ipums.org/metadata/usa/samples?version=2" \
-H "Authorization: $IPUMS_KEY"
import os
import time
import requests
BASE_URL = "https://api.ipums.org"
HEADERS = {"Authorization": os.environ.get("IPUMS_KEY", "")}
def create_extract(collection: str, samples: dict,
variables: list, description: str = "",
data_format: str = "csv") -> int:
"""Create an IPUMS data extract request."""
var_dict = {v: {} for v in variables}
body = {
"description": description,
"data_format": data_format,
"data_structure": {"rectangular": {"on": "P"}},
"samples": {s: {} for s in samples} if isinstance(samples, list)
else samples,
"variables": var_dict,
}
resp = requests.post(
f"{BASE_URL}/extracts/?collection={collection}&version=2",
headers={**HEADERS, "Content-Type": "application/json"},
json=body,
)
resp.raise_for_status()
return resp.json()["number"]
def wait_for_extract(extract_id: int, collection: str,
poll_interval: int = 30) -> str:
"""Poll until extract is ready, return download URL."""
while True:
resp = requests.get(
f"{BASE_URL}/extracts/{extract_id}"
f"?collection={collection}&version=2",
headers=HEADERS,
)
resp.raise_for_status()
data = resp.json()
status = data.get("status")
if status == "completed":
return data["download_links"]["data"]["url"]
elif status == "failed":
raise RuntimeError(f"Extract failed: {data}")
print(f"Status: {status}, waiting {poll_interval}s...")
time.sleep(poll_interval)
def get_variable_info(collection: str, variable: str) -> dict:
"""Get metadata about a variable."""
resp = requests.get(
f"{BASE_URL}/metadata/{collection}/variables/{variable}"
f"?version=2",
headers=HEADERS,
)
resp.raise_for_status()
return resp.json()
# Example: request 2020 ACS income data
extract_id = create_extract(
collection="usa",
samples=["us2020a"],
variables=["AGE", "SEX", "RACE", "EDUC", "INCTOT", "EMPSTAT"],
description="Education-income analysis 2020",
)
print(f"Extract #{extract_id} submitted. Waiting...")
download_url = wait_for_extract(extract_id, "usa")
print(f"Ready: {download_url}")
| Variable | Description |
|----------|-------------|
| AGE | Age |
| SEX | Sex |
| RACE | Race |
| EDUC | Education level |
| INCTOT | Total income |
| EMPSTAT | Employment status |
| OCC | Occupation |
| IND | Industry |
| POVERTY | Poverty status |
| MIGRATE1 | Migration status |
| MARST | Marital status |
| NCHILD | Number of children |
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.