{
  "openapi": "3.1.0",
  "info": {
    "title": "filetomp4.com public lookup API",
    "version": "1.0.0",
    "description": "Read-only endpoints for discovering public pages and guides on filetomp4.com. Conversion itself runs in the visitor's browser; these APIs do not accept video uploads."
  },
  "servers": [
    {
      "url": "https://filetomp4.com"
    }
  ],
  "paths": {
    "/api/pages": {
      "get": {
        "operationId": "listPages",
        "summary": "List public pages",
        "description": "Returns the catalog of public HTML pages with stable ids, paths, titles, summaries and tags.",
        "responses": {
          "200": {
            "description": "Page catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": { "type": "string" },
                    "origin": { "type": "string" },
                    "pages": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/Page" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/lookup": {
      "get": {
        "operationId": "lookupPages",
        "summary": "Search public pages",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": { "type": "string" },
            "description": "Free-text query matched against title, summary, path and tags"
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": { "type": "string" },
            "description": "Exact page id (e.g. home, mkv-to-mp4, guide-mov)"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching pages (may be empty)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": { "type": "string" },
                    "count": { "type": "integer" },
                    "results": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/Page" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Page": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "path": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "title": { "type": "string" },
          "summary": { "type": "string" },
          "tags": {
            "type": "array",
            "items": { "type": "string" }
          },
          "source_url": { "type": "string", "format": "uri" }
        }
      }
    }
  }
}
