stat-data-fetcher

Fetch World Bank time-series data and export as JSON or CSV.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/joshuaroll/research-skills --skill stat-data-fetcher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stat-data-fetcher
Source: https://github.com/joshuaroll/research-skills/tree/main/skills/stat-data-fetcher
Command: npx skills add https://github.com/joshuaroll/research-skills --skill stat-data-fetcher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests.

What problem does it solve?

This skill lets researchers retrieve accurate World Bank time-series data directly from the official API, eliminating manual data collection and the risk of misreporting.

Core Features & Use Cases

  • Search indicators: Find the correct indicator IDs by keyword (e.g., "GDP per capita" -> NY.GDP.PCAP.CD).
  • Fetch data: Retrieve country-level time-series data over a specified date range.
  • Fuzzy resolution: Accepts country names (France, USA) or codes and resolves to ISO3 codes.
  • CSV Export: Export results as JSON or CSV for analysis.

Quick Start

Run the script to fetch GDP per capita for the US and FR in CSV format: python3 fetch_worldbank.py --indicator NY.GDP.PCAP.CD --country "US;FR" --date "2020:2022" --format csv

Also, search for indicators by keyword: python3 fetch_worldbank.py --search "inflation"

Frequently Asked Questions about stat-data-fetcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch World Bank time-series data for GDP per capita?

You can fetch World Bank time-series data by running a Python script with the requests library, specifying the indicator ID, country names or ISO3 codes, and a date range to retrieve verifiable economic metrics.

Can I export World Bank statistical data to CSV for analysis?

Yes, you can export World Bank statistical data to CSV or JSON formats. By specifying the desired output format in your script execution, the tool outputs structured records containing country, iso3, year, value, indicator, and unit.

How do I find the correct World Bank indicator ID for inflation?

To find the correct World Bank indicator ID for inflation, use the search functionality within the script. Passing the keyword "inflation" queries the World Bank API and returns matching indicator IDs for your data retrieval.

Does this World Bank data fetcher support fuzzy country name resolution?

Yes, the World Bank data fetcher supports fuzzy country resolution. It accepts standard country names like France or USA, resolves them to their corresponding ISO3 codes, and retrieves the accurate country-level time-series data.

What is the best way to get verifiable economic metrics instead of secondary sources?

The best way to get verifiable economic metrics is to fetch time-series data directly from the official World Bank API. This approach eliminates manual data collection and the risk of misreporting from secondary sources.

Do I need the requests library to retrieve statistical data from the World Bank API?

Yes, you need the Python requests library installed in your environment. The solution relies on it to handle API queries, resolve fuzzy country names, and retrieve structured statistical data records over a specified date range.