{
  "openapi": "3.1.0",
  "info": {
    "title": "Brand Deal Radar Public Read API",
    "version": "1.0.0",
    "description": "Read-only access to public guide pages and official-source references. This site does not provide booking, payment, account, or inventory operations."
  },
  "servers": [
    {
      "url": "https://branddealradar.com"
    }
  ],
  "paths": {
    "/api/v1/articles": {
      "get": {
        "operationId": "listArticles",
        "summary": "List public guide pages",
        "responses": {
          "200": {
            "description": "Public articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "searchArticles",
        "summary": "Search public guide pages",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching public guides",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "query",
                    "items"
                  ],
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/articles/{slug}": {
      "get": {
        "operationId": "getArticle",
        "summary": "Read one public guide and its official-source facts",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public guide",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No guide with that exact slug"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ArticleSummary": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "url"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "target_keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
