{
  "openapi": "3.1.0",
  "info": {
    "title": "Speeder.ai Public Read-only API", "version": "1.0.0",
    "description": "Anonymous public marketplace reads. No account, API key or OAuth flow is required. Private portfolios, billing, inboxes and outreach actions are not part of this API.",
    "contact": { "name": "Speeder.ai support", "email": "support@speeder.ai", "url": "https://speeder.ai/contact" }
  },
  "servers": [{ "url": "https://speeder.ai" }],
  "security": [],
  "externalDocs": { "description": "Speeder.ai developer documentation", "url": "https://speeder.ai/docs" },
  "paths": {
    "/api/marketplace": {
      "get": {
        "operationId": "browsePublishedDomains", "summary": "Browse published marketplace domains",
        "description": "Prices are US dollar cents. Start at page 1 and increment page while hasMore is true. Listings without an asking price accept offers.",
        "security": [],
        "parameters": [
          { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 24 } },
          { "name": "page", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 1000000, "default": 1 } },
          { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "Domain-name search" },
          { "name": "category", "in": "query", "schema": { "type": "string" } },
          { "name": "tld", "in": "query", "schema": { "type": "string" }, "description": "Extension filter, for example com, ai or si, optionally with a leading dot" },
          { "name": "minPrice", "in": "query", "schema": { "type": "integer", "minimum": 0 }, "description": "Minimum asking price in USD cents" },
          { "name": "maxPrice", "in": "query", "schema": { "type": "integer", "minimum": 0 }, "description": "Maximum asking price in USD cents; must not be below minPrice" },
          { "name": "sort", "in": "query", "schema": { "type": "string", "enum": ["newest", "price_asc", "price_desc"], "default": "newest" } }
        ],
        "responses": {
          "200": { "description": "Published listings and pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketplacePage" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/api/marketplace/listings/{id}": {
      "get": {
        "operationId": "readPublicListing", "summary": "Read a public listing by UUID or URL slug",
        "description": "Use id or url_slug from a browse response. Anonymous reads do not expose private owner or buyer credentials.",
        "security": [],
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Listing UUID or URL slug" }],
        "responses": {
          "200": { "description": "Public listing details", "content": { "application/json": { "schema": { "type": "object", "required": ["listing"], "properties": { "listing": { "$ref": "#/components/schemas/PublicDomain" } } } } } },
          "404": { "description": "Listing does not exist or is not public", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": { "type": "object", "required": ["error"], "properties": { "error": { "type": "string" } } },
      "PublicDomain": {
        "type": "object", "required": ["id", "domain", "url_slug", "asking_price_cents", "category", "description", "created_at", "verified"],
        "properties": {
          "id": { "type": "string" }, "domain": { "type": "string" },
          "asking_price_cents": { "type": ["integer", "null"], "minimum": 1, "description": "Seller's asking price in USD cents, or null for make-an-offer listings" },
          "url_slug": { "type": "string" }, "description": { "type": ["string", "null"] },
          "category": { "type": ["string", "null"] }, "created_at": { "type": "string" }, "verified": { "type": "boolean" },
          "sales_copy": { "type": "object", "additionalProperties": true, "description": "Optional seller-facing domain sales copy, not evidence of an existing business or guaranteed results" }
        }, "additionalProperties": true
      },
      "MarketplacePage": {
        "type": "object", "required": ["listings", "total", "page", "pageSize", "hasMore"],
        "properties": {
          "listings": { "type": "array", "items": { "$ref": "#/components/schemas/PublicDomain" } },
          "total": { "type": "integer", "minimum": 0 },
          "page": { "type": "integer", "minimum": 1 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 100 },
          "hasMore": { "type": "boolean" }
        }, "additionalProperties": true
      }
    },
    "responses": {
      "BadRequest": { "description": "Invalid marketplace search", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "Unavailable": { "description": "Temporary server or upstream failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
    }
  }
}
