{
  "openapi": "3.1.0",
  "info": {
    "title": "FontsLike API",
    "version": "1.0.0",
    "description": "Static JSON endpoints and Model Context Protocol (MCP) tool interfaces for FontsLike. All font metadata, licence permissions, similarity lookalikes, and Unicode character maps are pre-rendered and freely accessible. For AI agent tool use over Streamable HTTP, see /mcp and /developers/.",
    "contact": {
      "name": "FontsLike Support",
      "email": "contact@fontslike.com",
      "url": "https://fontslike.com/developers/"
    },
    "license": {
      "name": "Open Data (Font files subject to individual OFL/Apache/UFL/CC0 licences)",
      "url": "https://fontslike.com/licences/"
    }
  },
  "servers": [
    {
      "url": "https://fontslike.com",
      "description": "Production host"
    }
  ],
  "paths": {
    "/api/fonts.json": {
      "get": {
        "summary": "List all open fonts",
        "description": "Returns the lightweight index of all 2,062 open fonts including slug, family name, category, licence, style count, variable support, and language subsets.",
        "operationId": "getFontsIndex",
        "responses": {
          "200": {
            "description": "Successful index response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "generated": {
                      "type": "string"
                    },
                    "fonts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "family": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "origin": {
                            "type": "string"
                          },
                          "licence": {
                            "type": "string"
                          },
                          "styles": {
                            "type": "integer"
                          },
                          "variable": {
                            "type": "boolean"
                          },
                          "popularity_rank": {
                            "type": "integer"
                          },
                          "subsets": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "top_tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "slug",
                          "family",
                          "category",
                          "licence",
                          "styles"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/fonts/{slug}.json": {
      "get": {
        "summary": "Get open font profile",
        "description": "Returns full font record for an open font, including resolved licence permission cards, axes, styles, and top lookalike matches.",
        "operationId": "getFontRecord",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the font (e.g. montserrat, roboto)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full font profile with resolved licence",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "slug": {
                      "type": "string"
                    },
                    "family": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "designers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "licence": {
                      "type": "object"
                    },
                    "resolved_licence": {
                      "type": "object"
                    },
                    "styles": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "cdn": {
                      "type": "object"
                    },
                    "similar_matches": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "required": [
                    "slug",
                    "family",
                    "category",
                    "licence",
                    "resolved_licence"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Font slug not found"
          }
        }
      }
    },
    "/api/fonts-like.json": {
      "get": {
        "summary": "List all font lookalike targets",
        "description": "Returns the directory of lookalike targets (1,958 fonts) with their top matches and similarity scores.",
        "operationId": "getFontsLikeIndex",
        "responses": {
          "200": {
            "description": "Lookalikes directory",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/fonts-like/{slug}.json": {
      "get": {
        "summary": "Get lookalike matches and similarity metrics",
        "description": "Returns top-ranked open lookalikes for a target font (commercial, system, or open font), including similarity scores, glyph cosine metrics, and permission cards.",
        "operationId": "getFontSimilar",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of target font (e.g. arial, helvetica, montserrat)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Similarity matches and licence comparisons",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Target font slug not found"
          }
        }
      }
    },
    "/api/licences.json": {
      "get": {
        "summary": "List all licence cards and permissions",
        "description": "Returns plain-English permission breakdowns for all tracked font licences across 8 standard uses.",
        "operationId": "getLicences",
        "responses": {
          "200": {
            "description": "Licence cards and permissions matrix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/licences/{slug}.json": {
      "get": {
        "summary": "Get licence detail card",
        "description": "Returns detailed permissions, clauses, verbatim quotes, and notes for a specific licence (e.g. ofl-1-1, apache-2-0).",
        "operationId": "getLicenceBySlug",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Licence slug (e.g. ofl-1-1, apache-2-0, ufl-1-0)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Single licence card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Licence slug not found"
          }
        }
      }
    },
    "/api/styles.json": {
      "get": {
        "summary": "List all font styles",
        "description": "Returns the 24 curated font style categories and their tag rules.",
        "operationId": "getStyles",
        "responses": {
          "200": {
            "description": "Font styles list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/styles/{slug}.json": {
      "get": {
        "summary": "Get fonts in a specific style",
        "description": "Returns member fonts matching a style category (e.g. gaming, pixel, handwriting).",
        "operationId": "getStyleDetail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Style slug (e.g. gaming, pixel, horror)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Style members and rules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Style slug not found"
          }
        }
      }
    },
    "/api/categories.json": {
      "get": {
        "summary": "List all typographic categories",
        "description": "Returns the 5 primary typographic categories (sans-serif, serif, monospace, handwriting, display).",
        "operationId": "getCategories",
        "responses": {
          "200": {
            "description": "Categories list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/categories/{category}.json": {
      "get": {
        "summary": "Get fonts in a category",
        "description": "Returns member fonts for a typographic category.",
        "operationId": "getCategoryDetail",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "description": "Category name (e.g. sans-serif, serif)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category font members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Category not found"
          }
        }
      }
    },
    "/api/languages.json": {
      "get": {
        "summary": "List all language & script subsets",
        "description": "Returns the 19 supported character subsets with native specimen text.",
        "operationId": "getLanguages",
        "responses": {
          "200": {
            "description": "Languages list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/languages/{subset}.json": {
      "get": {
        "summary": "Get fonts supporting a language subset",
        "description": "Returns member fonts supporting a specific character subset (e.g. vietnamese, cyrillic, japanese).",
        "operationId": "getLanguageDetail",
        "parameters": [
          {
            "name": "subset",
            "in": "path",
            "required": true,
            "description": "Subset identifier (e.g. vietnamese, cyrillic, arabic)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Language member fonts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Language subset not found"
          }
        }
      }
    },
    "/api/fancy-text.json": {
      "get": {
        "summary": "Get fancy text character maps",
        "description": "Returns 23 Unicode character conversion maps generated from Python unicodedata (bold, cursive, glitch, bubble, etc.) and unmapped character rules.",
        "operationId": "getFancyTextMaps",
        "responses": {
          "200": {
            "description": "Fancy text styles and character maps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/search-index.json": {
      "get": {
        "summary": "Get compact search index",
        "description": "Returns compact index of all fonts with tokenized tags, designers, popularity ranks, and licence IDs for rapid client-side and agent filtering.",
        "operationId": "getSearchIndex",
        "responses": {
          "200": {
            "description": "Search index array",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}