API reference
Base URL: https://api.onlyfonts.ai
All read endpoints are public — no API key required. Responses are JSON. Search endpoints are rate limited to 30 requests per minute per IP.
browse fonts
GET /v1/fonts
Query parameters:
| parameter | type | notes |
|---|---|---|
| category | string | serif, sans-serif, monospace, display, handwriting |
| license | string | filter by license id (e.g. ofl) |
| source | string | filter by catalog source |
| is_variable | boolean | variable fonts only / static only |
| sort | string | family (default), created_at, variant_count |
| order | string | asc (default), desc |
| limit | number | max 100, default 50 |
| offset | number | pagination offset |
curl 'https://api.onlyfonts.ai/v1/fonts?category=monospace&is_variable=true&limit=10'
font detail
GET /v1/fonts/{slug}
Returns full metadata: family, category, designer, license, variants, variable axes, mood/era/formality tags, language coverage, quality metrics, similar fonts, and pairing suggestions.
GET /v1/fonts/{slug}/variants
GET /v1/fonts/{slug}/pairings
Variants lists each weight/style with file sizes. Pairings returns scored heading/body combinations.
semantic search
POST /v1/search
Body:
{ "query": "warm serif for a bakery", "limit": 10, "lang": "uk", "is_variable": true }
query— natural-language description; matched against ML embeddings of every font’s visual appearance, not keywordslang— optional ISO 639 language filteris_variable— optionallimit— max 50
Returns ranked fonts with similarity scores.
identify a font from an image
Two steps — get an upload URL, upload the image, then search by its key:
GET /v1/search/upload-url
returns a presigned PUT URL and an r2_key. PUT your screenshot to the URL, then:
POST /v1/search
{ "r2_key": "<key from upload-url>", "limit": 10 }
Returns the closest-looking fonts in the catalog.
typography suggestions
POST /v1/suggest
Body (at least one field):
{ "project": "developer documentation site", "mood": "calm, technical", "content_type": "docs" }
Returns ranked font suggestions for the described project, scored against mood and use-case tags.
errors and limits
- errors return JSON:
{ "error": "message" }with appropriate status codes - search endpoints: 30 requests/minute per IP (429 when exceeded)
- for high-volume or commercial API use, contact support@onlyfonts.ai