ZimRate API Reference
Official Zimbabwe exchange rates, inflation data, and gold prices as clean JSON — free tier, no credit card required.
Overview
The ZimRate API provides programmatic access to official interbank exchange rates, inflation statistics, and gold coin prices published by the Reserve Bank of Zimbabwe (RBZ). Data is scraped from the RBZ website multiple times per day and served as clean JSON.
Base URL
All endpoints return JSON and support CORS for browser-based usage. Responses include Cache-Control headers — respect them to minimise unnecessary requests and avoid hitting rate limits.
Authentication
All /api/v1/* endpoints require an API key. Sign up free then create a named key from your dashboard. Keys are prefixed zr_.
Pass your key via the Authorization header (recommended) or the api_key query parameter:
Public endpoints (no key required): GET /api/v1/health and GET /api/v1/openapi.json.
Response Format
All successful responses use this envelope:
Error responses:
Common error codes:
UNAUTHORIZED401Missing or invalid API keyINVALID_PARAM400Bad query parameter valueNOT_FOUND404No data for the requested pair / typeRATE_LIMITED429Per-minute rate limit exceededDAILY_LIMIT_EXCEEDED429Daily quota reachedINTERNAL_ERROR500Server-side failureRate Limiting
Limits are enforced per API key on two dimensions:
Every authenticated response includes rate limit headers:
X-RateLimit-LimitPer-minute limit for your tierX-RateLimit-RemainingRequests remaining this minuteX-RateLimit-ResetUnix timestamp of next window resetX-Daily-LimitDaily cap (unlimited for premium)X-Daily-RemainingRequests remaining todayExceeding limits returns 429 with a Retry-After header. Daily counts reset at midnight UTC.
Health Check
Returns API and database connectivity status. No authentication required. Use this for uptime monitoring.
Response
Available Currencies
Returns all currency pairs with exchange rate data. Use this to discover valid values for the ?pair= parameter.
Response
Exchange Rates
Returns the latest RBZ interbank exchange rates with optional day-over-day change data.
Parameters
pairstringdefault: all pairsUSD/ZWG. Format: XXX/YYY. Case-insensitive.include_previousbooleandefault: truefalse to omit previous-day comparison fields.Example
Response
Rate History
Returns daily rate averages for a currency pair, sorted chronologically. Ideal for charting rate trends.
Parameters
pairstringdefault: USD/ZWGXXX/YYY format.daysintegerdefault: 30Example
Response
Inflation
Returns the latest Zimbabwe inflation figures including MoM, YoY, and food/non-food breakdowns.
Parameters
typestringdefault: bothUSD or ZWG.Example
Response
Gold Prices
Returns the latest RBZ Mosi-oa-Tunya gold coin selling prices in multiple currencies.
Parameters
currencystringdefault: all currenciesUSD, ZWG, ZAR. 2–4 letters. Case-insensitive.Example
Response
Code Examples
Fetching the latest USD/ZWG rate in common languages:
curl
JavaScript (fetch)
Python
Go
Data sourced from the Reserve Bank of Zimbabwe. ZimRate is an independent service — not affiliated with the RBZ or the Government of Zimbabwe. Privacy Policy · Terms of Service