# Formats

The API supports the following formats:
- JSON
- XML
- CSV

:::highlight blue 📌
JSON is the default format.
:::

You can specify the desired format using the query parameter `format`.

Example request for the XML format:
`https://api.globalexchangerates.org/v1/currencies?format=XML&code=EUR`

```
<?xml version="1.0" encoding="utf-16"?>
<currencies xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Currency>
        <code>EUR</code>
        <name>Euro</name>
        <numericCode>978</numericCode>
        <obsolete>false</obsolete>
    </Currency>
</currencies>
```

The CSV format supports an additional query parameter, `header`, which can be used to include column headers in the response.
`https://api.globalexchangerates.org/v1/currencies?format=CSV&code=EUR&header=true`

```
code,name,numericCode,obsolete
EUR,Euro,978,False
```

