{
  "openapi": "3.1.0",
  "info": {
    "title": "UniqueBase English edition – public read API",
    "version": "1.0.0",
    "description": "Read-only, unauthenticated access to published UniqueBase English records: AI companies, products, people, investors and funding news. Each HTML profile has .json and .md alternates with the same English content and source URLs. Automatic translation does not independently verify the underlying facts; check the original source before relying on a fact.",
    "contact": {
      "url": "https://uniquebase.ai/models"
    }
  },
  "servers": [
    {
      "url": "https://uniquebase.ai"
    }
  ],
  "externalDocs": {
    "description": "For AI models and agents",
    "url": "https://uniquebase.ai/models"
  },
  "paths": {
    "/search.json": {
      "get": {
        "operationId": "search",
        "summary": "Search all five directories",
        "description": "Same search as /search. Returns up to 5 matches per directory with totals; fewer than two characters returns empty groups.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Name, title, identifier or keyword (English or original Chinese).",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Grouped matches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/{kind}.json": {
      "get": {
        "operationId": "listDirectory",
        "summary": "List a directory",
        "description": "Paged list with the same filters as the HTML directory (for example q, country, sector, sort). `next` links the following page.",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "companies",
                "products",
                "people",
                "institutions",
                "news"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Name, title, identifier or keyword (English or original Chinese)."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "1-based page number."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter."
          },
          "404": {
            "description": "Missing, unpublished or out-of-range record."
          }
        }
      }
    },
    "/{kind}/{key}.json": {
      "get": {
        "operationId": "getProfile",
        "summary": "Get one profile as JSON",
        "description": "Key is the canonical slug, stable code (UB-…) or id; non-canonical keys 301 to the canonical path. Company profiles include finance.funding/valuation/revenue records, each with evidence { headline, brief, basis, newsPath, sourceCount }. The brief is the translated source news brief, not a quotation; sourceCount counts original source links (0 or 1).",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "companies",
                "products",
                "people",
                "institutions",
                "news"
              ]
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Profile.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "301": {
            "description": "Moved to the canonical key."
          },
          "404": {
            "description": "Missing, unpublished or out-of-range record."
          }
        }
      }
    },
    "/{kind}/{key}.md": {
      "get": {
        "operationId": "getProfileMarkdown",
        "summary": "Get one profile as Markdown",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "companies",
                "products",
                "people",
                "institutions",
                "news"
              ]
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Profile.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Missing, unpublished or out-of-range record."
          }
        }
      }
    },
    "/{place}.json": {
      "get": {
        "operationId": "listPlaces",
        "summary": "List sectors, themes, regions, countries or cities",
        "parameters": [
          {
            "name": "place",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sectors",
                "themes",
                "regions",
                "countries",
                "cities"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Taxonomy list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/{place}/{slug}.json": {
      "get": {
        "operationId": "getPlace",
        "summary": "Get one sector, theme, region, country or city with its companies",
        "parameters": [
          {
            "name": "place",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sectors",
                "themes",
                "regions",
                "countries",
                "cities"
              ]
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "1-based page number."
          }
        ],
        "responses": {
          "200": {
            "description": "Taxonomy page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Missing, unpublished or out-of-range record."
          }
        }
      }
    },
    "/feed/funding.xml": {
      "get": {
        "operationId": "fundingFeed",
        "summary": "RSS 2.0 of the latest funding rounds only",
        "description": "Up to 50 published funding rounds by announcement date. Rounds first recorded more than 30 days after announcement are omitted as historical backfill.",
        "responses": {
          "200": {
            "description": "RSS feed.",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "operationId": "updatesFeed",
        "summary": "RSS 2.0 of latest updated companies, people, products and funding rounds",
        "responses": {
          "200": {
            "description": "RSS feed.",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/graph.json": {
      "get": {
        "operationId": "graph",
        "summary": "Entity graph export (nodes and edges)",
        "responses": {
          "200": {
            "description": "Graph.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/popular-products.json": {
      "get": {
        "operationId": "popularProducts",
        "summary": "Top 50 products by visits in the latest complete traffic month",
        "responses": {
          "200": {
            "description": "Ranking.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/dataset.json": {
      "get": {
        "operationId": "dataset",
        "summary": "Dataset manifest: counts, snapshot and last source sync",
        "responses": {
          "200": {
            "description": "Manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "llmsTxt",
        "summary": "Site guide for language models",
        "responses": {
          "200": {
            "description": "Guide.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "llmsFullTxt",
        "summary": "Full guide with methodology FAQ and linked facts",
        "responses": {
          "200": {
            "description": "Guide.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}