{
  "openapi": "3.1.0",
  "info": {
    "title": "Sirlero public catalog",
    "version": "1.0.0",
    "description": "Search Sirlero’s public services, editorial stories, and author profiles by keyword."
  },
  "servers": [
    {
      "url": "https://sirlero.com"
    }
  ],
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "error"
        ]
      }
    }
  },
  "paths": {
    "/api/v1/search": {
      "get": {
        "operationId": "searchSirlero",
        "summary": "Search Sirlero’s public services, editorial stories, and author profiles by keyword.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "A service, topic, or author name to find."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Use the next_cursor returned by the same query.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching public pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "title",
                          "description",
                          "url"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "page"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid query or page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Wait for Retry-After before retrying.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}