Platform
Rate Limits
Safe client behavior for Africa API, including retries, batching, and caching guidance.
Current Behavior
As of March 2026, Africa API does not publish formal per-key quota headers. You should still build for backoff, batching, and caching.
Recommended Client Controls
- Set explicit request timeouts.
- Retry only transient failures (
429,5xx). - Batch related observations into one
/v1/datacall instead of many single-resource requests. - Cache
GET /v1/countriesusingETagandCache-Control. - Avoid request spikes when hydrating dashboards.
Retry Template (JavaScript)
async function requestWithBackoff(url, init, maxAttempts = 4) {
let delayMs = 300;
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
const response = await fetch(url, init);
if (response.ok) return response;
const retryable = response.status === 429 || response.status >= 500;
if (!retryable || attempt === maxAttempts) return response;
await new Promise((resolve) => setTimeout(resolve, delayMs + Math.random() * 200));
delayMs *= 2;
}
}Query Design Tips
- Prefer
country_codes=ng,ke,zaover three separate requests. - Prefer
metric_keys=population_total,gdp_current_usdwhere a combined response is acceptable. - Use
latest=truewhen you do not need a full time series.
Future Contract
If explicit quota headers or published plans are introduced, this page should be treated as the source of truth.