Currency Rates API Endpoint Documentation
Accessing historical and current foreign exchange rates for salary conversion and analysis.
Table of contents
Introduction
The Currency Rates endpoint in the jobdata API provides access to daily exchange rates for a wide range of global currencies. The data is sourced from Frankfurter, a reliable and widely used foreign exchange data provider. This endpoint is available to all plans, including public access, making it a valuable resource for applications that need currency conversion rates or historical currency comparisons.
Internally, jobdata uses this same currency rate data to normalize all salary values to both USD and EUR. This allows for consistent salary filtering across jobs in different currencies.
Endpoint Overview
Endpoint (list): /api/currencyrates/
Method: GET
Authorization Required: Yes
Description: The Currency Rates endpoint returns daily exchange rates for multiple currencies, with each record containing the date and a mapping of currency codes to their values against other currencies. Results can be filtered by date or date ranges, enabling retrieval of historical currency rate data.
Request
This endpoint can be accessed without authentication. Below are examples of making requests using both curl
and Python.
Listing Currency Rates Using curl
curl -X GET "https://jobdataapi.com/api/currencyrates/?date=2025-08-11"
Listing Currency Rates Using Python
import requests
url = "https://jobdataapi.com/api/currencyrates/"
params = {
"date": "2025-08-11"
}
response = requests.get(url, params=params)
print(response.json())
Parameters
The Currency Rates endpoint supports the following filters:
- date: Retrieve exchange rates for a specific date in
YYYY-MM-DD
format. Example:date=2025-08-11
- date_from: Retrieve rates from a starting date onward (inclusive).
Example:
date_from=2025-08-01
- date_to: Retrieve rates up to a specific date (inclusive).
Example:
date_to=2025-08-10
- page: Specifies the page number in the paginated result set.
- page_size: Determines the number of results per page (1 – 5000, default: 200).
Example Request with Parameters
cURL
curl -X GET "https://jobdataapi.com/api/currencyrates/?date_from=2025-08-01&date_to=2025-08-11&page=1&page_size=100"
Python
import requests
url = "https://jobdataapi.com/api/currencyrates/"
params = {
"date_from": "2025-08-01",
"date_to": "2025-08-11",
"page": 1,
"page_size": 100
}
response = requests.get(url, params=params)
print(response.json())
Response
The response is a JSON object containing the total count, pagination links, and an array of daily exchange rate objects.
Response Data Structure
- count: Total number of daily rate records matching the query.
- next: URL to the next page of results (pagination).
- previous: URL to the previous page of results (pagination).
-
results: An array of rate objects, each with:
-
date: Date of the rates (string,
YYYY-MM-DD
). - values: A nested object where each key is a currency code (e.g.,
USD
,EUR
) and the value is another object mapping target currencies to their rates.
Example Response
{
"count": 954,
"next": "https://jobdataapi.com/api/currencyrates/?page=2",
"previous": null,
"results": [
{
"date": "2025-08-11",
"values": {
"AUD": {"EUR": 1.7857, "USD": 1.5331},
"BGN": {"EUR": 1.9558, "USD": 1.6791},
"USD": {"EUR": 1.1648},
"EUR": {"USD": 0.85852},
...
}
}
]
}
Conversion Examples
The values
object shows conversion rates from a base currency to one or more target currencies.
For example:
"AUD": {"EUR": 1.7857, "USD": 1.5331}
means 1 AUD = 1.7857 EUR and 1 AUD = 1.5331 USD.
Example 1 — EUR to USD
If the values
include "EUR": {"USD": 0.85852}
,
then:
1 EUR = 0.85852 USD
10 EUR = 10 × 0.85852 = 8.5852 USD
Example 2 — USD to EUR
If "USD": {"EUR": 1.1648}
,
then:
1 USD = 1.1648 EUR
50 USD = 50 × 1.1648 = 58.24 EUR
Example 3 — Converting Between Two Currencies Without Direct Rate
If the direct conversion is not listed, you can use EUR as an intermediary (or any common currency):
Example: Converting 100 CAD to AUD Given:
CAD → EUR = 1.6003
AUD → EUR = 1.7857
First, convert CAD to EUR:
100 CAD × 1.6003 = 160.03 EUR
Then convert EUR to AUD (inverse of AUD → EUR):
1 AUD = 1.7857 EUR
1 EUR = 1 / 1.7857 = 0.5600 AUD
160.03 EUR × 0.5600 = 89.62 AUD
Python Helper Function for Currency Conversion
def convert_currency(values, from_currency, to_currency, amount):
from_currency = from_currency.upper()
to_currency = to_currency.upper()
# Direct conversion available
if from_currency in values and to_currency in values[from_currency]:
return amount * values[from_currency][to_currency]
# Try reverse conversion if available
if to_currency in values and from_currency in values[to_currency]:
return amount / values[to_currency][from_currency]
# Use EUR as intermediary if needed
if from_currency != "EUR" and to_currency != "EUR":
if from_currency in values and "EUR" in values[from_currency] \
and to_currency in values and "EUR" in values[to_currency]:
eur_amount = amount * values[from_currency]["EUR"]
return eur_amount / values[to_currency]["EUR"]
raise ValueError(f"Conversion from {from_currency} to {to_currency} not available.")
# Example usage
values = {
"AUD": {"EUR": 1.7857, "USD": 1.5331},
"USD": {"EUR": 1.1648},
"EUR": {"USD": 0.85852}
}
print(f"50 AUD = {convert_currency(values, 'AUD', 'USD', 50):.2f} USD")
Supported Currencies
The following currency codes are supported (from the example data):
AUD
, BGN
, BRL
, CAD
, CHF
, CNY
, CZK
, DKK
, EUR
, GBP
, HKD
,
HUF
, IDR
, ILS
, INR
, ISK
, JPY
, KRW
, MXN
, MYR
, NOK
, NZD
,
PHP
, PLN
, RON
, SEK
, SGD
, THB
, TRY
, USD
, ZAR
Use Cases
- Data Analysis: Perform historical trend analysis or correlation studies using daily rates.
- Job Search Filtering: Normalize all salary values to USD/EUR for accurate cross-currency job filtering.
Notes
- Data comes from the Frankfurter API and is updated about every 8 hours.
- All values are floating-point numbers representing the amount of target currency equivalent to 1 unit of the base currency.