JSON Date and Currency API Documentation BETA


Overview

This API provides a JSON object with the date and currency values requested by the client. The date and currency values are passed as GET parameters in the API request. The API checks if the date is in the valid format of YYYY-MM-DD and if the currency value is valid. The API is rate limited to 60 requests per minute per client; requests beyond that limit receive a JSON response containing an error field instead of rate data.

Endpoint

https://www.cursbnr.ro/api/json.php

Method: GET

Description:

This API returns the value of a specified currency on a specified date. If no date is specified, it returns the value of the currency on the current date. If no rates were published on the requested date (for example on weekends or public holidays), the most recent earlier rates are returned; the date field in the response shows the date those rates are from. If no currency is specified, it returns the value of the Euro (EUR) on the specified or current date.

The API can return either the exchange rate information in JSON format or just the exchange rate value. To retrieve the exchange rate information in JSON format, make a GET request to the API endpoint without the "number" parameter:

Input parameters:

Response:

The API returns a JSON object with the following properties:

Error handling:

If the date is not in the format YYYY-MM-DD, the API returns a JSON object with the following properties: error: "Invalid date format. Must be in YYYY-MM-DD format"

If the currency code is not supported, the API returns a JSON object with the following properties: error: "Invalid currency code: XYZ" (where XYZ is the code that was not recognised)

If the rate limit of 60 requests per minute is exceeded, the API returns a JSON object with the following properties: error: "Too many requests. Please try again."

Example requests:

https://www.cursbnr.ro/api/json.php

https://www.cursbnr.ro/api/json.php?date=2022-12-30

https://www.cursbnr.ro/api/json.php?date=2022-12-30&currency=USD&number

Response:

4.6346

Single currency example:

https://www.cursbnr.ro/api/json.php?currency=USD

Response:

{
  "date": "2025-08-07",
  "currency": "USD",
  "value": "4.3461"
}

Multiple currencies example:

https://www.cursbnr.ro/api/json.php?currency=EUR,USD,BGN

Response:

{
  "date": "2025-08-07",
  "values": {
    "EUR": "5.0736",
    "USD": "4.3461",
    "BGN": "2.5941"
  }
}

Last updated: October 19, 2026