# Statssa — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Monitor South Africa's economic health by accessing real-time retail trade sales, manufacturing production indices, and quarterly employment statistics directly from Statistics South Africa. Track key economic trends and indicators to inform your business decisions and economic analysis.

**Category:** Government & Public Data | **Website:** [www.statssa.gov.za/](https://www.statssa.gov.za/) | **Docs:** [parse.bot/marketplace/a2bbef53-fe63-4914-ae7a-50a7eeaf3dd4/statssa-gov-za-api](https://parse.bot/marketplace/a2bbef53-fe63-4914-ae7a-50a7eeaf3dd4/statssa-gov-za-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get core cpi

Full monthly time series of South Africa's core CPI (headline CPI excluding food and non-alcoholic beverages, fuel and energy), index base Dec 2024=100. Covers all urban areas from January 2008, ordered newest-first. Each observation carries the index value and year-over-year percentage change. The series code is CPS00014 from publication P0141.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/get-core-cpi \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get employment

Full quarterly time series from the Quarterly Employment Statistics (QES) survey. Covers total formal non-agricultural employment from Q3 2009, ordered newest-first. Each observation includes total employed (number), quarter-over-quarter percentage change, and a sector breakdown by major SIC industry division. Source publication P0277.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/get-employment \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get headline cpi

Full monthly time series of South Africa's headline CPI (all items, all urban areas), index base Dec 2024=100. Covers all urban areas from January 2008, ordered newest-first. Each observation carries the index value and year-over-year percentage change. The series code is CPS00000 from publication P0141.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/get-headline-cpi \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get industrial production

Full monthly time series of the South African manufacturing production index (base 2019=100, actual indices). Covers total manufacturing from January 1998, ordered newest-first. Each observation carries the index value and year-over-year percentage change. The series code is MPI30000 from publication P3041.2.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/get-industrial-production \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get ppi

Full monthly time series of South Africa's Producer Price Index (PPI) for final manufactured goods, index base Dec 2023=100. Covers data from January 2012, ordered newest-first. Each observation carries the index value and year-over-year percentage change. The series code is PPC30000 from publication P0142.1.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/get-ppi \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get retail sales

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.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/statssa/get-retail-sales \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.