Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: mearef — Middle Eastern government reference data Certified…
version: 1.0.0
description: 'Middle Eastern government reference data for 9 countries as cited JSON: central-bank policy rates, VAT/GST and VAT registration thresholds, CPI, corporate, personal and withholding tax, social contributions, minimum wages, statutory interest, official FX rates, filing deadlines and public holidays (coverage varies by country). Every value carries its official source URL and last-confirmed date. Single facts $0.003; country brief (every series for one country) $0.01; cross-country compare (one series, up to 10 countries) $0.02; tax-ID and VAT-number checks $0.003; computed answers (VAT, income tax, working days, minimum-wage check) $0.01-$0.02. Pay per call in USDC on Base via x402 or MPP, no signup, or by card with credit packs or monthly plans on one key valid across all 7 regional services. Free tier: GET /catalog, plus a free email key with 50 answer calls a day, commercial use allowed. Finished answers, one cited dossier per call (supported countries vary per job; others are refused free): cost this hire (wage-floor verdict, contributions, employer cost) $0.50; charge this sale (which VAT applies, net/VAT/gross) $0.50; charge this sale certified (plus a signed VAT-rate extract) $0.75; invoice due date and statutory late interest $0.40; country evidence pack (brief plus signed extracts) $0.25; hire compare $0.75 for 2 countries, $1.00 for 3-5; next filings (VAT, PAYE, corporate-tax due dates rolled for holidays) $0.35; invoice check (VAT right or wrong, overdue interest, tax-ID format) $0.60.
Free trial: 3 successful calls per day per IP, shared across POST /v1/answers/* and POST /v1/jobs/*. No header needed (X-Free-Trial: 1 is accepted but not required); an empty-body POST gets the normal x402 402 and does not use the trial; a CoinbaseBazaarDiscovery user-agent also gets that 402 and does not use the trial (the user-agent is not a credential); once used up, the 402 carries free_trial_resets_at. MCP answer tools use the trial automatically when no api_key is passed. Every series of the evaluation country is free. Card credit (same per-call price as x402): /pricing.'
x-guidance: 'GET /v1/{country}/{series} returns the current value of a reference series — e.g. GET /v1/ae/policy-rate. Countries: ae, bh, il, iq, jo, kw, om, qa, sa. Series: policy-rate, vat, vat-registration-threshold, minimum-wage, public-holidays, cpi, corporate-tax, withholding-tax, statutory-interest, income-tax, social-contributions, filing-deadlines. Append /history for past values. GET /v1/all returns every series for every country in one call. GET /catalog (free) lists all available series with freshness metadata, each with the official source it is cited to. If you are an x402/API seller making a cross-border digital sale, POST /v1/vat/determine tells you which jurisdiction''s VAT applies, who accounts for it, and the registration trigger — cited to the statute (EU, UK, South Africa), and it handles the wallet-only unidentified-buyer case. Payment is x402 (USDC on Base) per call; no signup or API keys needed. Retention: GET /v1/changes (free; past moves and freshness), GET /v1/calendar (free; reverify_by is derived from last_confirmed + update_cycle_days; next_effective_known only when current.effective_to is set; status unknown omits any next date; notes are never parsed; not an MPC, budget, or wage-review date), and POST /alerts (register free) are how a paying agent watches a value after the first paid call. Do not re-buy a series to find out whether it moved. GET /v1/calendar is not a promised future gazette.'
contact:
name: afriref API support
email: api@3l-groupconsulting.co.za
url: https://mearef.dev/pricing
x-agentcash-owner: fou53506
termsOfService: https://mearef.dev/terms
servers:
- url: https://mearef.dev
security:
- x402Payment: []
- apiKey: []
tags:
- name: Certified
description: 'Series certified extracts: one value together with its citation, the fingerprint of the archived source document, and how it was verified, at GET /v1/certified/{country}/{series}. Answer receipts (kind answer_receipt) are a different artifact — they ride on paid answer POSTs when receipt:true, share the public key, and are not this extract.'
paths:
/v1/certified/{country}/{series}:
get:
operationId: getCertifiedExtract
summary: 'Certified extract: the value plus its full evidence chain, Ed25519-signed'
description: 'Signed, dated evidence for one value: citation, sha256 of the archived source, last confirmation, limitations. Ed25519; free key: https://mearef.dev/certified/public-key. Refused free (422) if the source is unfingerprinted. Certifies the source supported the value then, not that nothing newer exists.'
tags:
- Certified
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.100000'
protocols:
- x402: {}
- mpp:
method: evm
intent: charge
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
network: eip155:8453
security:
- x402: []
- x402Payment: []
- apiKey: []
parameters:
- name: country
in: path
required: true
schema:
type: string
enum:
- ae
- bh
- il
- iq
- jo
- kw
- om
- qa
- sa
example: ae
example: ae
description: Country code
- name: series
in: path
required: true
schema:
type: string
enum:
- policy-rate
- vat
- vat-registration-threshold
- minimum-wage
- public-holidays
- cpi
- corporate-tax
- withholding-tax
- statutory-interest
- income-tax
- social-contributions
- filing-deadlines
example: policy-rate
example: policy-rate
description: Series id
responses:
'200':
description: Signed certified extract
content:
application/json:
schema:
$ref: '#/components/schemas/CertifiedExtract'
'402':
$ref: '#/components/responses/PaymentRequired'
'404':
description: Unknown country or series
'422':
$ref: '#/components/responses/Refusal'
x-description-full: 'A signed, dated evidence artifact for one series value - for filing, audit or dispute. Carries the value, its citation, the sha256 fingerprint of the cited source document AS ARCHIVED by this service, how and when the value was last confirmed (byte-identity of the source, mechanical relocation of the value inside it, or an agent reading the source), the located-in-document evidence where held, and the extract''s own limitations. Signed with Ed25519 over canonical JSON; verify with the free public key at https://mearef.dev/certified/public-key. REFUSES (422, uncharged) when the cited source is currently blocked to automation, broken, or not yet fingerprinted: a certificate backed by evidence we do not hold would be worth less than none. What it certifies is that the cited document supported the value on the stated date - NOT that no newer instrument exists elsewhere. This endpoint is the series certified extract only. It is not an answer receipt: kind answer_receipt is embedded in a paid POST /v1/answers/* HTTP 200 when that body sets receipt:true, is included in the answer''s existing price, and is a different artifact verified with the same public key.'
components:
schemas:
PaymentRequired:
type: object
description: 'HTTP 402 body: the price and how to pay it. Retry the same request with the signed payment in PAYMENT-SIGNATURE (x402 v2) or X-PAYMENT (v1).'
properties:
x402Version:
type: integer
error:
type: string
accepts:
type: array
description: Payment options; each carries the amount, asset, network and pay-to address.
items:
type: object
Error:
type: object
description: 'Every refusal carries a machine-readable reason. This service refuses rather than guesses, so a 4xx here often means ''we will not assert something we cannot evidence'' - not that the request was malformed. Beyond the base fields, each refusal type attaches the structured data an agent needs to RECOVER: a coverage refusal names the covered period, an unknown-subdivision refusal lists the valid codes, a permanent-horizon refusal says not to retry. Fields absent from a given refusal simply do not apply to it.'
properties:
error:
type: string
description: Short machine-readable reason, e.g. 'calendar_coverage_exhausted', 'unknown_calendar', 'no_verified_convention', 'commencement_date_unknown', 'absence_not_dated'
explanation:
type: string
description: What specifically was wrong or unprovable, in plain language
no_charge:
type: boolean
description: true when the refusal was validated BEFORE the payment gate and nothing was billed
coverage:
type: array
description: 'On coverage refusals: the period each named calendar actually covers, so the caller can re-send a range inside it'
items:
type: object
properties:
calendar:
type: string
from:
type: string
format: date
to:
type: string
format: date
reached:
type: string
format: date
description: 'On coverage refusals during counting: the last date that COULD be evaluated before coverage ran out'
available_subdivisions:
type: array
items:
type: string
description: 'On unknown-subdivision refusals: every ISO 3166-2 code this country serves - re-send with one of these'
permanent:
type: boolean
description: 'true when the refusal is structural, not a backlog: the blocking facts (e.g. moon-sighting holiday dates) cannot exist yet. Do not queue a retry.'
pending_window:
type: object
description: 'On not-yet-gazetted holiday placeholders: the window in which the official date will fall'
countries:
type: array
items:
type: string
description: 'On unknown-country refusals: the country codes this brand serves'
detail:
type: string
description: Additional machine-oriented detail where the error code alone is ambiguous
required:
- error
example:
error: calendar_coverage_exhausted
explanation: The requested range 2028-01-01 to 2028-03-31 falls outside the period our KE holiday calendar covers (2024-01-01 to 2027-12-31). We do not extrapolate holiday calendars by rule. No charge has been made.
coverage:
- calendar: ke
from: '2024-01-01'
to: '2027-12-31'
no_charge: true
CertifiedExtract:
type: object
description: A signed series certified extract. Not an answer receipt (kind answer_receipt lives on paid answer responses). The signature covers the canonical JSON of certified_extract exactly as received.
properties:
certified_extract:
type: object
properties:
format:
type: string
const: afriref-certified-extract/1
issued_at:
type: string
format: date-time
extract_id:
type: string
description: Stable id derived from the extract's own content
issuer:
type: object
subject:
type: object
properties:
country:
type: string
series:
type: string
value:
type: object
description: Value, unit, effective dates, confidence and staleness, plus confidence_label and coverage_label (signed)
citation:
type: object
description: Official source name and URL; includes the rule-vs-instances split for dated series
source_document:
type: object
description: 'The cited document as archived: sha256 over the retrieved bytes, size, content type, first and latest fingerprint dates, and whether a copy is held.'
verification:
type: object
description: How and when the value was last confirmed, and - where the mechanical pass holds it - the value located in the archived document with surrounding context.
limitations:
type: array
items:
type: string
description: What this extract does NOT certify. Always populated.
signature:
type: object
properties:
alg:
type: string
const: Ed25519
key_id:
type: string
public_key:
type: string
format: uri
signed_payload:
type: string
description: How to reconstruct the signed bytes
value:
type: string
description: Base64 Ed25519 signature
confidence_label:
type: string
enum:
- high
- medium
- low
description: 'Derived from source type, verification age, stale. Rules: /label-rules'
coverage_label:
type: string
enum:
- ready
- partial
- gap
description: 'ready=complete, partial=limited, gap=no number. Rules: /label-rules'
label_basis:
type: object
description: Inputs and rule ids behind both labels
responses:
Refusal:
description: Refused, with the reason. Validation refusals happen BEFORE payment and are never charged.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PaymentRequired:
description: Payment required - retry with PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1), or send X-API-Key.
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequired'
securitySchemes:
x402Payment:
type: apiKey
in: header
name: X-PAYMENT
description: x402 (USDC on Base). Call without this header, receive HTTP 402 carrying the price and payment details, then retry with the signed payment payload in X-PAYMENT. No signup, no account, no key. Per-operation prices are in the x-payment-info extension and at https://mearef.dev/pricing.
apiKey:
type: apiKey
in: header
name: X-API-Key
description: 'Prepaid credit bought by card (from $10) at https://mearef.dev/pricing, or a free key by email at https://mearef.dev/free-key (50 calls a day on answer endpoints, commercial use allowed). Send the key on every call. How the two payment rails charge: both rails charge the same US-dollar price per call. By card, prepaid credit is worth $0.001 per credit on the $10, $25 and $100 packs and each successful call debits its endpoint price in credits (a $0.003 value is 3 credits, a $0.002 holidays call is 2, an alert delivery after the free trial is 50, a $0.10 certified extract is 100); over x402, every call pays the price quoted in its own 402 challenge, $0.002 to $1.00 depending on the endpoint (listed at https://mearef.dev/pricing). Failed or refused calls are not charged on either rail. Keys bought before 12 October 2026 keep their original one-credit-per-call terms, and keys bought from 12 to 16 October keep $0.005 credits. Use this instead of x402 if you want an invoice.'
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: 'x402 v2 (USDC on Base, network eip155:8453): call without payment, receive HTTP 402 with the v2 PAYMENT-REQUIRED challenge, retry with the signed payload in PAYMENT-SIGNATURE. The challenge is v2 only, so a client must read v2; X-PAYMENT is also accepted as the payment header. No signup, no key.'
x-example-urls:
- https://mearef.dev/catalog
- https://mearef.dev/v1/calendar
- https://mearef.dev/public/ae/holidays
- https://mearef.dev/v1/ae/policy-rate
- https://mearef.dev/v1/ae/policy-rate/history
- https://mearef.dev/v1/all