example-data.com
Menu
Browse docs and collections

currencies

currencies

Browse 50 currencies records. Explore sample records and fetch JSON over a free REST API for prototypes, tests, and learning.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/currencies?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/currencies?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/currencies.d.ts https://example-data.com/types/currencies.d.ts
import type { Currency, ListEnvelope } from "./types/currencies";

const res = await fetch(
  "https://example-data.com/api/v1/currencies?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Currency>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/currencies",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 1,
      "code": "USD",
      "name": "United States Dollar",
      "symbol": "$",
      "decimalDigits": 2
    },
    {
      "id": 2,
      "code": "EUR",
      "name": "Euro",
      "symbol": "€",
      "decimalDigits": 2
    },
    {
      "id": 3,
      "code": "GBP",
      "name": "British Pound Sterling",
      "symbol": "£",
      "decimalDigits": 2
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 50,
    "totalPages": 2
  },
  "links": {
    "self": "/api/v1/currencies?page=1",
    "first": "/api/v1/currencies?page=1",
    "last": "/api/v1/currencies?page=2",
    "next": "/api/v1/currencies?page=2",
    "prev": null
  }
}

View full response →