# Fonts API
> The Google Fonts catalogue as an API — 1,900+ open-source font families with everything you need to pick and embed a typeface. Look up a family (e.g. Roboto → category, available weights, variable-font axes, subsets and a ready-to-use CSS embed URL); search by name, category (Sans Serif, Serif, Display, Handwriting, Monospace), subset, weight or variable-font support; or list the most popular families. Each record carries the weights/styles, variable axes (wght, wdth, …), language subsets, designers, popularity rank and a Google Fonts CSS2 embed URL. Ideal for design tools, website builders, font pickers and theming systems.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/fonts-api/..."
```

## Pricing
- **Free** (Free) — 5,000 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 60,000 calls/Mo, 8 req/s
- **Pro** ($15/Mo) — 300,000 calls/Mo, 20 req/s
- **Mega** ($37/Mo) — 1,500,000 calls/Mo, 50 req/s

## Endpoints

### Fonts

#### `GET /v1/font` — A single font family (weights, axes, subsets, CSS url)

**Parameters:**
- `family` (query, required, string) — Font family name, e.g. Roboto Example: `Roboto`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fonts-api/v1/font?family=Roboto"
```

**Response:**
```json
{
    "data": {
        "axes": [
            {
                "max": 100,
                "min": 75,
                "tag": "wdth",
                "default": 100
            },
            {
                "max": 900,
                "min": 100,
                "tag": "wght",
                "default": 400
            }
        ],
        "family": "Roboto",
        "italic": true,
        "stroke": "Sans Serif",
        "css_url": "https://fonts.googleapis.com/css2?family=Roboto:wght@100;200;300;400;500;600;700;800;900&display=swap",
        "subsets": [
            "menu",
            "cyrillic",
            "cyrillic-ext",
            "greek",
            "greek-ext",
            "latin",
            "latin-ext",
            "math",
            "symbols",
            "vietnamese"
        ],
        "weights": [
            100,
            200,
            300,
            400,
            500,
            600,
            700,
            800,
            900
        ],
        "category": "Sans Serif",
        "trending": 1033,
        "variable": true,
        "designers": [
            "Christian Robertson",
            "ParaType",
            "Font Bureau"
        ],
        "date_added": "2013-01-08",
        "popularity": 2,
        "open_source": true,
        "last_modified": "2026-02-19",
        "classifications": []
    },
    "meta": {
        "timestamp": "2026-05-31T04:30:17.060Z",
        "request_id": "205e11c4-975e-45bc-9c99-3163d1c9eaa5"
    },
    "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/popular` — Most popular families

**Parameters:**
- `category` (query, optional, string) — Restrict to a category
- `limit` (query, optional, string) — Max results (1-100, default 25) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fonts-api/v1/popular?limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "results": [
            {
                "family": "Roboto",
                "italic": true,
                "css_url": "https://fonts.googleapis.com/css2?family=Roboto:wght@100;200;300;400;500;600;700;800;900&display=swap",
                "weights": [
                    100,
                    200,
                    300,
                    400,
                    500,
                    600,
                    700,
                    800,
                    900
                ],
                "category": "Sans Serif",
                "variable": true,
                "popularity": 2
            },
            {
                "family": "Open Sans",
                "italic": true,
                "css_url": "https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap",
                "weights": [
                    300,
                    400,
                    500,
                    600,
                    700,
                    800
                ],
                "category": "Sans Serif",
                "variable": true,
                "popularity": 3
            },
            {
                "family": "Google Sans",
                "italic": true,
                "css_url": "https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700&display=swap",
                "weights": [
                    400,
                    500,
                    60
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search by name with category / subset / weight / variable filters

**Parameters:**
- `q` (query, optional, string) — Name / designer search, e.g. mono
- `category` (query, optional, string) — Sans Serif | Serif | Display | Handwriting | Monospace Example: `Serif`
- `subset` (query, optional, string) — Language subset, e.g. latin, cyrillic, greek
- `weight` (query, optional, string) — Only families offering this weight, e.g. 700
- `variable` (query, optional, string) — true = variable fonts only
- `limit` (query, optional, string) — Results per page (1-100, default 20) Example: `20`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fonts-api/v1/search?category=Serif&limit=20&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "limit": 20,
        "query": null,
        "total": 348,
        "offset": 0,
        "filters": {
            "subset": null,
            "weight": null,
            "category": "serif",
            "variable": null
        },
        "results": [
            {
                "family": "Abhaya Libre",
                "italic": false,
                "css_url": "https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400;500;600;700;800&display=swap",
                "weights": [
                    400,
                    500,
                    600,
                    700,
                    800
                ],
                "category": "Serif",
                "variable": false,
                "popularity": 396
            },
            {
                "family": "Abyssinica SIL",
                "italic": false,
                "css_url": "https://fonts.googleapis.com/css2?family=Abyssinica+SIL:wght@400&display=swap",
                "weights": [
                    400
                ],
                "category": "Serif",
                "variable": false,
                "popularity": 1068
            },
            {
                "family": "Adamina",
                "italic": false,
                "css_url": "https://fonts.googleapis.com/css2?family=Adamina:wght@400&display=swap",
                "weights": [
                    400
                ],
                "category": "Serif",
              
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Totals, categories & subsets

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fonts-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "popularity/trending are 1-based ranks (1 = most popular). css_url embeds the family via Google Fonts CSS2.",
        "total": 1934,
        "fields": [
            "family",
            "category",
            "stroke",
            "classifications",
            "subsets",
            "weights",
            "italic",
            "variable",
            "axes",
            "designers",
            "popularity",
            "trending",
            "date_added",
            "last_modified",
            "open_source",
            "css_url"
        ],
        "source": "Google Fonts (official catalogue metadata)",
        "subsets": [
            "adlam",
            "ahom",
            "anatolian-hieroglyphs",
            "arabic",
            "armenian",
            "avestan",
            "balinese",
            "bamum",
            "bassa-vah",
            "batak",
            "bengali",
            "beria-erfe",
            "bhaiksuki",
            "brahmi",
            "braille",
            "buginese",
            "buhid",
            "canadian-aboriginal",
            "carian",
            "caucasian-albanian",
            "chakma",
            "cham",
            "cherokee",
            "chinese-hongkong",
            "chinese-simplified",
            "chinese-traditional",
            "chorasmian",
            "coptic",
            "cuneiform",
            "cypriot",
            "cypro-minoan",
            "cyrillic",
            "cyrillic
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/fonts-api
OpenAPI spec: https://www.oanor.com/api/fonts-api/openapi.json
