{
  "openapi": "3.1.0",
  "info": {
    "title": "Chekzy Data API",
    "version": "1.0.0",
    "contact": {
      "name": "Chekzy",
      "email": "hello@chekzy.com",
      "url": "https://chekzy.com"
    },
    "description": "Read-only public API for official-source US business and license verification data. It returns the same public fields shown on Chekzy profiles. No street address, phone, email, birth year, or other personally identifiable information is stored or returned. No API key is required. Chekzy is not a licensing authority; confirm status with the source link in each record. Not for hiring, tenant, or credit screening."
  },
  "servers": [
    {
      "url": "https://chekzy.com"
    }
  ],
  "tags": [
    {
      "name": "Lookup",
      "description": "Search public official-source records."
    },
    {
      "name": "Records",
      "description": "Fetch one public business record."
    }
  ],
  "paths": {
    "/api/lookup": {
      "get": {
        "operationId": "lookupBusinesses",
        "tags": [
          "Lookup"
        ],
        "summary": "Search official-source business records",
        "description": "Search by name (or a 10-digit NPI) with optional state, category, and city filters. There is no page or limit query parameter; each response includes at most 25 results. About 60 requests per minute per address; over that the API returns HTTP 429. Responses are cached for 5 minutes.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Business or person name words. Required unless npi is given. Trimmed and limited to 80 characters. Must contain at least one letter or number when npi is not given.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "npi",
            "in": "query",
            "required": false,
            "description": "A 10-digit National Provider Identifier. When set, looks up that NPI instead of searching by name.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{10}$"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Two-letter US state code, such as CA or NY. Case-insensitive; echoed in the response in uppercase.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Category slug from https://chekzy.com/llms.txt, such as electrician. Unknown slugs return HTTP 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Optional city word, trimmed and limited to 40 characters.",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results. count is the number of results in this response; limit is always 25.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LookupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name, npi, state, or category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Retry-After is 60 seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "example": "60"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/b/{id}.json": {
      "get": {
        "operationId": "getBusinessJson",
        "tags": [
          "Records"
        ],
        "summary": "Get one business record as JSON",
        "description": "The same public record as GET /api/b/{id}, served on the profile URL and edge-cached for up to one hour. Claimed profiles may also include the owner's description and website, plus badgeLive. Investment adviser representative (iar_*) records may also include an adviser object. Hidden or not-listed profiles return HTTP 404.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Chekzy business id, such as iapd_324483 or npi_1104266410.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One public business record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessResponse"
                }
              }
            }
          },
          "404": {
            "description": "No visible public record for this id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Retry-After is 60 seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "example": "60"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "LookupResponse": {
        "type": "object",
        "required": [
          "query",
          "count",
          "limit",
          "results",
          "notice"
        ],
        "properties": {
          "query": {
            "$ref": "#/components/schemas/LookupQuery"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of results in this response."
          },
          "limit": {
            "type": "integer",
            "const": 25,
            "description": "Maximum results per lookup. Always 25. Not a request parameter."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LookupBusiness"
            }
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "LookupQuery": {
        "type": "object",
        "required": [
          "name",
          "state",
          "category",
          "city",
          "npi"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Uppercase two-letter US state code, or null if not provided."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Canonical public category slug, or null if not provided."
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "npi": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BusinessResponse": {
        "type": "object",
        "required": [
          "result",
          "notice"
        ],
        "properties": {
          "result": {
            "$ref": "#/components/schemas/Business"
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "Category": {
        "type": "object",
        "required": [
          "slug",
          "name"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "SourceRecord": {
        "type": "object",
        "required": [
          "category",
          "status",
          "sourceName",
          "sourceUrl",
          "licenseNumber",
          "licenseState",
          "expiresOn",
          "lastChecked"
        ],
        "properties": {
          "category": {
            "type": "string",
            "description": "Public category slug."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Licensed, Registered, No license required, or Added by owner."
          },
          "sourceName": {
            "type": "string"
          },
          "sourceUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "licenseNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "License or registration number. NPPES license numbers are not returned; the NPI is on the parent record instead. New York SED profession licenses also omit the number."
          },
          "licenseState": {
            "type": [
              "string",
              "null"
            ],
            "description": "Two-letter state for the license, or null for NPPES records."
          },
          "expiresOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "lastChecked": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Date Chekzy last checked this source record. Null on owner-added listings."
          }
        }
      },
      "LookupBusiness": {
        "type": "object",
        "required": [
          "id",
          "name",
          "entityType",
          "categories",
          "state",
          "city",
          "status",
          "npi",
          "lastChecked",
          "chekzyUrl",
          "claimedByOwner",
          "terms",
          "termsUrl",
          "records"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Official source name."
          },
          "entityType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Typically organization or individual."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Overall status: Licensed, Registered, No license required, or Added by owner."
          },
          "npi": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastChecked": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "chekzyUrl": {
            "type": "string",
            "format": "uri"
          },
          "claimedByOwner": {
            "type": "boolean"
          },
          "terms": {
            "type": "string"
          },
          "termsUrl": {
            "type": "string",
            "format": "uri"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRecord"
            }
          }
        }
      },
      "Business": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LookupBusiness"
          },
          {
            "type": "object",
            "required": [
              "badgeLive"
            ],
            "properties": {
              "badgeLive": {
                "type": "boolean",
                "description": "True when a live Chekzy Verified badge is currently active."
              },
              "badgeLiveUntil": {
                "type": "string",
                "format": "date",
                "description": "Present only when badgeLive is true and a paid-through date is set."
              },
              "description": {
                "type": "string",
                "description": "Owner-supplied profile description. Present only on claimed profiles that have one."
              },
              "website": {
                "type": "string",
                "format": "uri",
                "description": "Owner-linked website. Present only on claimed profiles that have one."
              },
              "adviser": {
                "$ref": "#/components/schemas/Adviser",
                "description": "Present only on investment adviser representative (iar_*) records when IAR facts are available."
              }
            }
          }
        ]
      },
      "Adviser": {
        "type": "object",
        "required": [
          "role",
          "crd",
          "iapdUrl",
          "firms",
          "exams",
          "designations"
        ],
        "properties": {
          "role": {
            "type": "string",
            "description": "Investment adviser representative."
          },
          "crd": {
            "type": "string"
          },
          "iapdUrl": {
            "type": "string",
            "format": "uri"
          },
          "firms": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "crd",
                "chekzyUrl"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "crd": {
                  "type": "string"
                },
                "chekzyUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri"
                }
              }
            }
          },
          "exams": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "date"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                }
              }
            }
          },
          "designations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}