{
  "openapi": "3.1.0",
  "info": {
    "title": "HighLevelKit Search API",
    "version": "1.0.0",
    "description": "Listings are directory descriptions, not hands-on verification. Confirm pricing, compatibility and current availability with the provider. No unverified review counts or ratings are supplied."
  },
  "servers": [
    {
      "url": "https://highlevelkit.com"
    }
  ],
  "paths": {
    "/api/search": {
      "get": {
        "operationId": "searchHighLevelKit",
        "summary": "Search GoHighLevel tools and guides",
        "description": "Case-insensitive keyword search. All query words must match. Results are ordered by relevance, then name. Empty q lists all records. Categories use exact IDs from catalog.json.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Keyword query, for example automation or GHL jobs remote."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact category ID from catalog.json."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching records and pagination",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "query",
                    "total",
                    "limit",
                    "offset",
                    "results"
                  ],
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Record"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query or pagination"
          },
          "405": {
            "description": "Only GET and HEAD are supported"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Record": {
        "type": "object",
        "required": [
          "type",
          "slug",
          "name",
          "url",
          "summary"
        ],
        "properties": {
          "type": {
            "enum": [
              "app",
              "guide"
            ]
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "textUrl": {
            "type": "string",
            "format": "uri"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "providerDetailsVerifiedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
