{
  "openapi": "3.1.0",
  "info": {
    "title": "rejstr.cz Public API",
    "version": "1.0.0",
    "description": "Low-volume public Czech company data. Anonymous access is available; an API key only increases quotas.",
    "contact": {
      "url": "https://rejstr.cz/pro-vyvojare#kontakt"
    }
  },
  "servers": [
    {
      "url": "https://rejstr.cz"
    }
  ],
  "tags": [
    {
      "name": "Subjects",
      "description": "Public company-only profiles; no natural-person profiles."
    },
    {
      "name": "Name check",
      "description": "Non-binding registry-name text-similarity pre-check."
    }
  ],
  "paths": {
    "/api/v1/subjects/{ico}": {
      "get": {
        "tags": [
          "Subjects"
        ],
        "operationId": "getSubject",
        "summary": "Get a public company profile by IČO (one to eight digits)",
        "parameters": [
          {
            "name": "ico",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,8}$"
            },
            "example": "28862961",
            "description": "One to eight digits; shorter values are left-padded with zeroes."
          }
        ],
        "responses": {
          "200": {
            "description": "Company-only public profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "tags": [
          "Subjects"
        ],
        "operationId": "searchSubjects",
        "summary": "Search public companies by name or IČO",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            },
            "description": "Anonymous maximum is 10; keyed maximum is 50."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 0
            },
            "description": "Anonymous maximum is 100; keyed maximum is 1000."
          }
        ],
        "responses": {
          "200": {
            "description": "Paged company summaries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/name-check": {
      "get": {
        "tags": [
          "Name check"
        ],
        "operationId": "checkCompanyNameGet",
        "summary": "Check a proposed company name (cacheable GET)",
        "description": "The name appears in the URL and access logs. When the local ÚPV feature is enabled and ready, the response includes a separate indicative Czech-national-trademark block. Deceptive meaning and domain availability are not checked.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "enum": [
                "cs",
                "en"
              ],
              "default": "cs"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Similarity result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NameCheckResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Name-check data is not ready"
          }
        }
      },
      "post": {
        "tags": [
          "Name check"
        ],
        "operationId": "checkCompanyNamePost",
        "summary": "Check a proposed company name (JSON POST)",
        "description": "Returns registry-name risk and, when enabled and ready, a separate indicative Czech-national-trademark block. Trademark text similarity is not a legal assessment. Deceptive meaning and domain availability are not checked.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "lang": {
                    "enum": [
                      "cs",
                      "en"
                    ],
                    "default": "cs"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Similarity result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NameCheckResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "413": {
            "description": "Payload too large"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "Name-check data is not ready"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional; increases quota only."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Optional public API key."
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "required": [
          "requestId",
          "profile",
          "sourceUrls"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "profile": {
            "const": "public-core"
          },
          "dataUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sourceUrls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "webUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "SubjectSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ico",
          "name",
          "slug",
          "status"
        ],
        "properties": {
          "ico": {
            "type": "string",
            "pattern": "^[0-9]{8}$"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "dissolved",
              "unknown"
            ]
          },
          "address": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SubjectResponse": {
        "type": "object",
        "required": [
          "ok",
          "data",
          "meta"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubjectSummary"
              },
              {
                "type": "object",
                "description": "Allowlisted company fields, activities, NACE, published business accounts, company relationships and sourced flags. Natural persons and raw registry payloads are excluded."
              }
            ]
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "required": [
          "ok",
          "data",
          "meta"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "data": {
            "type": "object",
            "required": [
              "items",
              "page"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SubjectSummary"
                }
              },
              "page": {
                "type": "object",
                "required": [
                  "limit",
                  "offset"
                ],
                "properties": {
                  "limit": {
                    "type": "integer"
                  },
                  "offset": {
                    "type": "integer"
                  },
                  "total": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "NameCheckResponse": {
        "type": "object",
        "required": [
          "ok",
          "data",
          "meta"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "data": {
            "type": "object",
            "required": [
              "query",
              "normalizedQuery",
              "verdict",
              "riskLevel",
              "highestSimilarityPercent",
              "engineVersion",
              "scope",
              "candidatesCompared",
              "candidateLimit",
              "candidateLimitReached",
              "collisionsFound",
              "collisions",
              "checks",
              "warnings"
            ],
            "properties": {
              "query": {
                "type": "string"
              },
              "normalizedQuery": {
                "type": "string"
              },
              "verdict": {
                "enum": [
                  "strong_collision",
                  "possible_collision",
                  "no_strong_collision"
                ]
              },
              "riskLevel": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              },
              "highestSimilarityPercent": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "engineVersion": {
                "type": "string"
              },
              "scope": {
                "const": "active_current_registry_names"
              },
              "candidatesCompared": {
                "type": "integer"
              },
              "candidateLimit": {
                "type": "integer"
              },
              "candidateLimitReached": {
                "type": "boolean"
              },
              "collisionsFound": {
                "type": "integer",
                "minimum": 0
              },
              "datasetUpdatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "collisions": {
                "type": "array",
                "maxItems": 10,
                "items": {
                  "type": "object",
                  "required": [
                    "ico",
                    "name",
                    "webUrl",
                    "severity",
                    "riskLevel",
                    "similarityPercent",
                    "reasonCodes",
                    "matchedTokens",
                    "explanation"
                  ],
                  "properties": {
                    "ico": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "webUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "severity": {
                      "enum": [
                        "strong",
                        "possible",
                        "related"
                      ]
                    },
                    "riskLevel": {
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "similarityPercent": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100,
                      "description": "Normalized character overlap for orientation; not a probability of registration."
                    },
                    "reasonCodes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "matchedTokens": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "explanation": {
                      "type": "string"
                    }
                  }
                }
              },
              "trademarkCheck": {
                "type": "object",
                "description": "Optional local Czech-national-trademark comparison sourced from official ÚPV open data; not a legal assessment or proof of ownership.",
                "required": [
                  "scope",
                  "verdict",
                  "riskLevel",
                  "candidatesCompared",
                  "candidateLimit",
                  "candidateLimitReached",
                  "collisionsFound",
                  "sourceName",
                  "sourceUrl",
                  "coverage",
                  "disclaimer",
                  "collisions"
                ],
                "properties": {
                  "scope": {
                    "const": "upv_czech_national_trademarks"
                  },
                  "verdict": {
                    "enum": [
                      "strong_collision",
                      "possible_collision",
                      "no_strong_collision"
                    ]
                  },
                  "riskLevel": {
                    "enum": [
                      "high",
                      "medium",
                      "low"
                    ]
                  },
                  "candidatesCompared": {
                    "type": "integer"
                  },
                  "candidateLimit": {
                    "type": "integer"
                  },
                  "candidateLimitReached": {
                    "type": "boolean"
                  },
                  "collisionsFound": {
                    "type": "integer"
                  },
                  "datasetUpdatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "sourceName": {
                    "type": "string"
                  },
                  "sourceUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "coverage": {
                    "type": "string"
                  },
                  "disclaimer": {
                    "type": "string"
                  },
                  "collisions": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "required": [
                        "applicationNumber",
                        "name",
                        "officialUrl",
                        "statusGroupCode",
                        "severity",
                        "riskLevel",
                        "similarityPercent",
                        "reasonCodes",
                        "explanation"
                      ],
                      "properties": {
                        "applicationNumber": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        },
                        "registrationNumber": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "officialUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "statusGroupCode": {
                          "type": "integer"
                        },
                        "severity": {
                          "enum": [
                            "strong",
                            "possible",
                            "related"
                          ]
                        },
                        "riskLevel": {
                          "enum": [
                            "high",
                            "medium",
                            "low"
                          ]
                        },
                        "similarityPercent": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "reasonCodes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "explanation": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "checks": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "registrySimilarity",
                  "deceptiveMeaning",
                  "trademarks",
                  "domainAvailability"
                ],
                "properties": {
                  "registrySimilarity": {
                    "const": "checked"
                  },
                  "deceptiveMeaning": {
                    "enum": [
                      "not_checked",
                      "warnings_present"
                    ]
                  },
                  "trademarks": {
                    "enum": [
                      "not_checked",
                      "checked"
                    ]
                  },
                  "domainAvailability": {
                    "const": "not_checked",
                    "description": "The public API never queries domain availability automatically."
                  }
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "enum": [
                  "BAD_REQUEST",
                  "NOT_FOUND",
                  "RATE_LIMITED",
                  "SERVICE_UNAVAILABLE",
                  "PAYLOAD_TOO_LARGE",
                  "UNAUTHORIZED",
                  "INTERNAL_ERROR"
                ]
              },
              "message": {
                "type": "string"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Subject not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Quota exceeded; inspect Retry-After",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "security": [
    {},
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ]
}