Discover/Gov API
live

Gov APIstatssa.gov.za

Access South African retail trade sales, manufacturing production index, core CPI, and quarterly employment data from Statistics South Africa via a single API.

This API takes change requests — .
Endpoint health
verified 1h ago
get_industrial_production
get_retail_sales
get_employment
get_core_cpi
get_ppi
3/3 passing latest checkself-healing
Endpoints
5
Updated
1h ago

What is the Gov API?

The Stats SA API exposes four endpoints covering South Africa's key macroeconomic time series published by Statistics South Africa. The get_retail_sales endpoint alone returns monthly observations from January 2002, each with a value in R Million and a year-over-year percentage change. All four endpoints deliver full historical time series with consistent metadata fields including start_date, end_date, frequency, publication, and series_code.

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 recent 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 Producer Price Index observations (final manufactured goods)
for obs in client.producer_price_indexes.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 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: retail_saleses.fetch / industrial_productions.fetch / producer_price_indexes.fetch / core_cpis.fetch / employments.fetch")
All endpoints · 5 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

Four endpoints map directly to Stats SA statistical releases: retail trade sales (P6242.1), manufacturing production index (P3041.2), quarterly employment statistics (P0277), and core CPI (P0141). Each response includes a time_series array ordered newest-first, alongside metadata fields such as title, unit, count, start_date, and end_date. No query parameters are needed — each endpoint returns the full available history for its series.

Endpoint Details

get_retail_sales returns monthly total retail trade sales at constant 2019 prices, expressed in R Million, from January 2002. Each observation includes value and pct_change_yoy. get_industrial_production returns the manufacturing production index (base 2019=100) from January 1998, also with value and pct_change_yoy per month. get_employment delivers quarterly formal non-agricultural employment from Q3 2009; each observation adds a sector_breakdown object alongside total_employed and pct_change_qoq. get_core_cpi returns headline CPI excluding food, non-alcoholic beverages, fuel, and energy, indexed to December 2024=100, from January 2008.

Data Shape and Dates

Date formatting is consistent across endpoints: monthly series use YYYY-MM and the quarterly employment series uses YYYY-QN notation (e.g. 2024-Q1). The publication field on each response echoes the official Stats SA release code, making it straightforward to cross-reference the underlying statistical release. The series_code field appears both in the top-level response object and inside each observation in the time_series array.

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
1h ago
Latest check
3/3 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 African retail trade sales trends over time using the value and pct_change_yoy fields from get_retail_sales.
  • Tracking manufacturing output cycles by monitoring the production index returned by get_industrial_production against its 2019=100 baseline.
  • Building a South African economic dashboard that combines CPI, employment, retail, and industrial production in one data pipeline.
  • Calculating real GDP proxies or coincident indicators by combining get_retail_sales and get_industrial_production monthly series.
  • Monitoring formal sector employment trends quarter-over-quarter using total_employed and pct_change_qoq from get_employment.
  • Analyzing sector-level employment shifts using the sector_breakdown object returned in each get_employment observation.
  • Tracking underlying inflation pressure in South Africa using the core CPI series from get_core_cpi, which strips out food and energy.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Statistics South Africa provide 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 primarily through its website at statssa.gov.za in the form of statistical releases and downloadable datasets.
What does the `get_employment` endpoint return beyond a headline employment number?+
Each quarterly observation includes total_employed (number of employees in formal non-agricultural sectors), pct_change_qoq (quarter-over-quarter percentage change), date in YYYY-QN format, series_code, and a sector_breakdown object that disaggregates employment across industries within that quarter. Coverage starts at Q3 2009.
Does the API cover provincial or sub-national breakdowns of retail sales or CPI?+
Not currently. All four endpoints return national-level aggregates. The core CPI series covers all urban areas as a single figure, and retail sales represents total South Africa. You can fork this API on Parse and revise it to add endpoints targeting provincial or metro-level series where Stats SA publishes them.
How fresh is the data, and how often is it updated?+
Each endpoint reflects Stats SA's own publication schedule. Retail trade and manufacturing production are monthly releases; core CPI is monthly; employment is quarterly. The end_date field in each response tells you the most recent observation date, so you can check data currency without fetching the full time_series array.
Can I retrieve a subset of the time series, for example only the last 12 months?+
The endpoints do not accept date-range parameters — each call returns the full historical series. The time_series array is ordered newest-first, so you can slice the first N observations client-side. You can fork this API on Parse and revise it to add date-filter parameters if you need server-side range queries.
Page content last updated . Spec covers 5 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.
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.
statistiken.bundesbank.de API
Retrieve Deutsche Bundesbank's macroeconomic data including exchange rates, interest rates, and financial statistics by searching for specific time series or browsing topics to access historical data points. Monitor Germany's key economic indicators and financial metrics directly from the official central bank database.