Discover/Gov API
live

Gov APIstatssa.gov.za

Access South African CPI, PPI, retail trade sales, manufacturing production index, and employment time series from Statistics South Africa via a single API.

This API takes change requests — .
Endpoint health
verified 4d ago
get_retail_sales
get_core_cpi
get_ppi
get_industrial_production
get_employment
6/6 passing latest checkself-healing
Endpoints
6
Updated
11d ago

What is the Gov API?

The Stats SA API exposes 6 endpoints covering South Africa's key national economic indicators, sourced from Statistics South Africa (statssa.gov.za). You can retrieve full monthly time series for headline CPI, core CPI, PPI, retail trade sales, and the manufacturing production index, plus a quarterly employment series with sector-level breakdowns. Each endpoint returns a structured time series with observation dates, index or value readings, and year-over-year or quarter-over-quarter percentage changes.

This call costs2 credits / call— charged only on success
Try it

No input parameters required.

api.parse.bot/scraper/a0a792cf-df9f-4db2-b5cb-0ad696f26e57/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/a0a792cf-df9f-4db2-b5cb-0ad696f26e57/get_retail_sales' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace statssa-gov-za-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Stats SA Economic Indicators SDK — bounded, re-runnable; every call capped."""
from parse_apis.Stats_SA_Economic_Indicators_API import StatsSA, ParseError

client = StatsSA()

# Fetch headline CPI observations (all items, all urban areas)
for obs in client.headline_cpis.fetch(limit=3):
    print(obs.date, obs.value, obs.pct_change_yoy)

# Fetch core CPI observations (excl food & NAB, fuel and energy)
for obs in client.core_cpis.fetch(limit=3):
    print(obs.date, obs.value, obs.pct_change_yoy)

# Fetch retail trade sales observations (monthly, constant 2019 prices)
for obs in client.retail_saleses.fetch(limit=3):
    print(obs.date, obs.value, obs.pct_change_yoy)

# Fetch manufacturing production index observations
for obs in client.industrial_productions.fetch(limit=3):
    print(obs.date, obs.value, obs.pct_change_yoy)

# Fetch quarterly employment data with sector breakdown
for obs in client.employments.fetch(limit=3):
    print(obs.date, obs.total_employed, obs.pct_change_qoq)
    for sector, count in list(obs.sector_breakdown.items())[:2]:
        print(f"  {sector}: {count}")

# Typed error handling around a fetch call
try:
    latest = client.producer_price_indexes.fetch(limit=1).first()
    if latest:
        print(latest.date, latest.value, latest.series_code)
except ParseError as e:
    print(f"error: {e.code}")

print("exercised: headline_cpis.fetch / core_cpis.fetch / retail_saleses.fetch / industrial_productions.fetch / employments.fetch / producer_price_indexes.fetch")
All endpoints · 6 totalmissing one? ·

Full monthly time series of South African retail trade sales at constant 2019 prices (actual values). Covers total retail from January 2002, ordered newest-first. Each observation carries the value in R Million and year-over-year percentage change. The series code is con_act (constant prices, actual estimates) from publication P6242.1.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "unit": "Unit of measurement (R Million)",
    "count": "Total number of observations",
    "title": "Series title",
    "end_date": "Most recent observation date (YYYY-MM)",
    "frequency": "Data frequency (Monthly)",
    "start_date": "Earliest observation date (YYYY-MM)",
    "price_basis": "Price basis description",
    "publication": "Stats SA publication code (P6242.1)",
    "series_code": "Internal series identifier",
    "time_series": "Array of monthly observations ordered newest-first, each with date, value, pct_change_yoy, and series_code"
  },
  "sample": {
    "data": {
      "unit": "R Million",
      "count": 292,
      "title": "Retail trade sales",
      "end_date": "2026-04",
      "frequency": "Monthly",
      "start_date": "2002-01",
      "price_basis": "Constant 2019 prices",
      "publication": "P6242.1",
      "series_code": "con_act",
      "time_series": [
        {
          "date": "2026-04",
          "value": 96764,
          "series_code": "con_act",
          "pct_change_yoy": 1.27
        },
        {
          "date": "2026-03",
          "value": 99422,
          "series_code": "con_act",
          "pct_change_yoy": 2.49
        }
      ]
    },
    "status": "success"
  }
}

About the Gov API

What the API covers

Six endpoints map directly to Stats SA's flagship statistical releases. get_headline_cpi and get_core_cpi both return monthly CPI series (base Dec 2024=100) from January 2008 onward, covering all urban areas. Headline CPI uses all items; core CPI excludes food and non-alcoholic beverages, fuel, and energy. get_ppi returns the Producer Price Index for final manufactured goods (base Dec 2023=100) from January 2012. get_retail_sales returns total retail trade sales at constant 2019 prices in R Million from January 2002. get_industrial_production returns the manufacturing production index (base 2019=100) from January 1998. get_employment returns quarterly formal non-agricultural employment totals from Q3 2009, with a sector breakdown per observation.

Response shape

Every endpoint returns a metadata envelope — title, series_code, publication, frequency, unit, start_date, end_date, and count — alongside a time_series array ordered newest-first. Monthly endpoints carry date (YYYY-MM), value, pct_change_yoy, and series_code per entry. The quarterly get_employment endpoint uses date in YYYY-QN format, total_employed (number of employees), pct_change_qoq, and a sector_breakdown object per observation. Publication codes (e.g. P0141 for CPI, P3041.2 for manufacturing, P0277 for employment) match Stats SA's official release identifiers.

Coverage notes

All series start at the earliest available observation in the respective Stats SA database and extend to the most recent published figure. None of the endpoints require input parameters — each call returns the complete available history for that series. Series codes such as MPI3, CPS0000, and con_act correspond to Stats SA's own internal identifiers and are included in both the envelope and individual observations to support downstream data lineage tracking.

Reliability & maintenanceVerified

The Gov API is a managed, monitored endpoint for statssa.gov.za — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when statssa.gov.za changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official statssa.gov.za API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
6/6 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Charting South Africa's inflation trend by plotting pct_change_yoy from get_headline_cpi and get_core_cpi side by side over time
  • Building a South African economic dashboard that displays the latest retail trade value in R Million from get_retail_sales
  • Monitoring manufacturing sector health by tracking the production index and year-over-year changes from get_industrial_production
  • Comparing upstream and downstream price pressures by overlaying PPI from get_ppi with headline CPI from get_headline_cpi
  • Tracking formal employment trends and sector composition using the quarterly total_employed and sector_breakdown fields from get_employment
  • Feeding South African macro indicators into econometric models using the full back-history available in each time series
  • Alerting systems that flag when the latest pct_change_yoy in any series crosses a defined threshold
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Statistics South Africa have an official developer API?+
Stats SA does not publish a documented public REST API for programmatic access to its time series data. Data is made available through its website at statssa.gov.za primarily in the form of statistical releases and downloadable files.
What does `get_employment` return beyond a headline employment total?+
Each quarterly observation includes total_employed (number of employees in formal non-agricultural sectors), pct_change_qoq (quarter-over-quarter percentage change), and a sector_breakdown object that splits employment across industry sectors. The series starts from Q3 2009 and maps to Stats SA publication P0277.
Does the API cover sub-categories of retail trade or CPI by expenditure group?+
Not currently. get_retail_sales returns the aggregate total retail series, and the CPI endpoints cover all-items headline and a single core (ex-food, fuel, energy) series. Breakdowns by retail sub-sector or individual CPI expenditure group are not exposed. You can fork this API on Parse and revise it to add endpoints for specific sub-categories.
How far back does the manufacturing production index go?+
The get_industrial_production endpoint returns data from January 1998, making it the longest historical series in this API. The index uses base 2019=100 and corresponds to Stats SA publication P3041.2. The complete history is returned in a single call with no pagination parameters.
Does the API cover regional or provincial breakdowns of any indicator?+
Not currently. All six endpoints return national-level aggregates — CPI covers all urban areas as a single series, employment covers total formal non-agricultural employment nationally, and retail and manufacturing figures are country-wide totals. You can fork this API on Parse and revise it to add province- or metro-level endpoints where Stats SA releases that data.
Page content last updated . Spec covers 6 endpoints from statssa.gov.za.
Related APIs in Government PublicSee all →
resbank.co.za API
Access real-time and historical financial data from South Africa's central bank, including prime rates, repo rates, exchange rates, inflation metrics (CPI and PPI), and commodity prices like gold. Track key interest rate benchmarks such as SABOR and ZARONIA rates, and monitor market rates to stay informed on South African economic indicators.
argenstats.com API
Access Argentina's key economic indicators including the EMAE activity index, inflation (IPC), dollar exchange rates (BLUE, CCL, MEP, OFICIAL, and more), country risk, employment, and poverty levels. Retrieve current values, historical series, and forecasting event listings from ArgenStats.
esankhyiki.mospi.gov.in API
Access India's official macroeconomic statistics including RBI indicators, National Accounts data, and labor force surveys directly from the government's statistical database. Browse dashboards, infographics, and detailed metadata to explore economic trends, employment figures, and key financial indicators.
data.stats.gov.cn API
Access comprehensive statistical data, economic indicators, and official reports from China's National Bureau of Statistics through simple searches and structured queries. Retrieve detailed articles, data releases, indicator trends, and downloadable documents to analyze China's economic and social statistics.
jse.co.za API
Access live JSE stock prices, company profiles, and market indices from the Johannesburg Stock Exchange. Search SENS announcements and view comprehensive market statistics to stay informed on JSE activity.
tradingeconomics.com API
Access real-time economic calendars, macroeconomic indicators, and commodity prices across global markets including G20 nations and emerging economies. Monitor historical charts, country-specific economic data, and the latest financial news to track economic trends and make informed investment decisions.
ibef.org API
Access comprehensive reports on Indian industries and states, browse the latest economic news, and get quick facts about India's economy all in one place. Search across thousands of resources to find detailed insights on specific sectors, regions, and economic trends.
rba.gov.au API
Access Reserve Bank of Australia data including CPI inflation (current and historical), housing and business lending rates, AUD exchange rates, monetary policy/cash rate changes, and the RBA balance sheet.