agentsclimarketplace

Nber working papers api

Skill brycewang-stanford/Auto-Empirical-Research-Skills/skills/43-wentorai-research-plugins/skills/domains/economics/nber-working-papers-api

Access NBER working papers and economic research datasetsFrom its SKILL.md

Install
npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill nber-working-papers-api

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

5.6 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

NBER Working Papers and Data API

Overview

The National Bureau of Economic Research (NBER) is the leading U.S. economics research organization, publishing 1,200+ working papers annually by top economists. NBER papers are among the most cited in economics. The website provides structured access to working papers, researcher profiles, and macroeconomic datasets. Free metadata access; some full text requires subscription.

Working Papers Access

RSS/Atom Feeds

# Latest working papers feed
curl "https://www.nber.org/papers.rss"

# Papers by program
curl "https://www.nber.org/programs/ef/papers.rss"  # Economic Fluctuations
curl "https://www.nber.org/programs/ls/papers.rss"  # Labor Studies
curl "https://www.nber.org/programs/io/papers.rss"  # Industrial Organization

Working Paper Search

# Search via NBER website (HTML scraping needed)
curl "https://www.nber.org/api/v1/working_page_listing/contentType/working_paper/?page=1&perPage=20&q=inflation+expectations"

# Get specific paper metadata
curl "https://www.nber.org/api/v1/working_page_listing/contentType/working_paper/?page=1&perPage=1&q=w28104"

NBER Data Portal

# Macroeconomic history data
# Available at: https://data.nber.org/

# Business cycle dates
curl "https://data.nber.org/data/cycles/business_cycle_dates.json"

# CPS labor data extracts
# https://data.nber.org/cps/

NBER Programs

CodeProgramFocus
efEconomic Fluctuations and GrowthMacro, business cycles
lsLabor StudiesEmployment, wages
ioIndustrial OrganizationMarkets, competition
pePublic EconomicsTaxation, spending
heHealth EconomicsHealthcare markets
deDevelopment EconomicsDeveloping countries
ifInternational FinanceExchange rates, capital flows
itInternational TradeTrade policy
meMonetary EconomicsCentral banking
cfCorporate FinanceFirm finance
apAsset PricingFinancial markets
edEducationEducation economics
agAgingDemographics
chChildrenChild welfare
leLaw and EconomicsLegal institutions
envEnvironment and EnergyEnvironmental policy
polPolitical EconomyPolitical institutions

Python Usage

import requests
from xml.etree import ElementTree


def get_latest_papers(program: str = None,
                      count: int = 20) -> list:
    """Get latest NBER working papers via RSS."""
    if program:
        url = f"https://www.nber.org/programs/{program}/papers.rss"
    else:
        url = "https://www.nber.org/papers.rss"

    resp = requests.get(url, timeout=30)
    resp.raise_for_status()

    root = ElementTree.fromstring(resp.content)
    papers = []
    for item in root.findall(".//item")[:count]:
        papers.append({
            "title": item.findtext("title", ""),
            "link": item.findtext("link", ""),
            "description": item.findtext("description", "")[:300],
            "pub_date": item.findtext("pubDate", ""),
        })
    return papers


def search_papers(query: str, page: int = 1,
                  per_page: int = 20) -> list:
    """Search NBER working papers."""
    resp = requests.get(
        "https://www.nber.org/api/v1/working_page_listing/"
        "contentType/working_paper/",
        params={"q": query, "page": page, "perPage": per_page},
        timeout=30,
    )
    resp.raise_for_status()
    data = resp.json()

    results = []
    for item in data.get("results", []):
        results.append({
            "title": item.get("title"),
            "authors": item.get("authors", ""),
            "number": item.get("wp_number", ""),
            "date": item.get("date", ""),
            "url": f"https://www.nber.org/papers/{item.get('wp_number', '')}",
            "abstract": item.get("description", "")[:300],
            "program": item.get("programs", []),
        })
    return results


def get_business_cycle_dates() -> list:
    """Get NBER official business cycle dates."""
    resp = requests.get(
        "https://data.nber.org/data/cycles/business_cycle_dates.json",
        timeout=30,
    )
    resp.raise_for_status()
    return resp.json()


# Example: latest macro working papers
papers = get_latest_papers(program="ef", count=5)
for p in papers:
    print(f"{p['title']}")
    print(f"  {p['link']}")

# Example: search for AI economics papers
results = search_papers("artificial intelligence labor market")
for r in results:
    print(f"[{r['number']}] {r['title']}")
    print(f"  Authors: {r['authors']}")

# Example: recession dates
cycles = get_business_cycle_dates()
for c in cycles[-3:]:
    print(f"Peak: {c.get('peak')} → Trough: {c.get('trough')}")

Key Datasets

DatasetDescription
Business Cycle DatesOfficial US recession start/end dates
CPS ExtractsCurrent Population Survey labor data
Macrohistory Database150 years of macro indicators
Patent DataPatent citation and classification
Trade DataBilateral trade statistics

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.