{
  "openapi": "3.1.0",
  "info": {
    "title": "x402 Content Hub",
    "version": "1.0.0",
    "description": "Amazon products, real-time news, image search, Medium articles, and Spotify data. Pay with USDC on Base.",
    "contact": { "email": "sna4an@users.noreply.github.com" },
    "x-guidance": "All endpoints use POST with JSON body. Amazon needs ASIN or query, news needs topic, images needs query, Medium needs URL or query, Spotify needs track/artist ID or query."
  },
  "servers": [{ "url": "https://x402-content-hub.vercel.app" }],
  "paths": {
    "/api/amazon/product": {
      "post": {
        "operationId": "amazonProduct",
        "summary": "Amazon product details",
        "tags": ["Amazon"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "asin": { "type": "string", "description": "Amazon ASIN" } }, "required": ["asin"] } } } },
        "responses": { "200": { "description": "Product data", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/amazon/search": {
      "post": {
        "operationId": "amazonSearch",
        "summary": "Search Amazon products",
        "tags": ["Amazon"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string", "description": "Search query" } }, "required": ["query"] } } } },
        "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/amazon/reviews": {
      "post": {
        "operationId": "amazonReviews",
        "summary": "Amazon product reviews",
        "tags": ["Amazon"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "asin": { "type": "string", "description": "Amazon ASIN" } }, "required": ["asin"] } } } },
        "responses": { "200": { "description": "Reviews data", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/amazon/deals": {
      "post": {
        "operationId": "amazonDeals",
        "summary": "Amazon current deals",
        "tags": ["Amazon"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } },
        "responses": { "200": { "description": "Deals data", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/news/latest": {
      "post": {
        "operationId": "newsLatest",
        "summary": "Latest breaking news",
        "tags": ["News"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "country": { "type": "string", "default": "US" } } } } } },
        "responses": { "200": { "description": "News data", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/news/search": {
      "post": {
        "operationId": "newsSearch",
        "summary": "Search news by topic",
        "tags": ["News"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string", "description": "Search topic" } }, "required": ["query"] } } } },
        "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/news/top-headlines": {
      "post": {
        "operationId": "newsTopHeadlines",
        "summary": "Top headlines by category",
        "tags": ["News"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "country": { "type": "string", "default": "US" }, "category": { "type": "string", "default": "general" } } } } } },
        "responses": { "200": { "description": "Headlines data", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/images/search": {
      "post": {
        "operationId": "imagesSearch",
        "summary": "Search images by query",
        "tags": ["Images"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string", "description": "Search query" } }, "required": ["query"] } } } },
        "responses": { "200": { "description": "Image results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/images/reverse": {
      "post": {
        "operationId": "imagesReverse",
        "summary": "Reverse image search",
        "tags": ["Images"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "Image URL" } }, "required": ["url"] } } } },
        "responses": { "200": { "description": "Reverse search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/medium/article": {
      "post": {
        "operationId": "mediumArticle",
        "summary": "Get Medium article content",
        "tags": ["Medium"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "Medium article URL" } }, "required": ["url"] } } } },
        "responses": { "200": { "description": "Article content", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/medium/search": {
      "post": {
        "operationId": "mediumSearch",
        "summary": "Search Medium articles",
        "tags": ["Medium"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string", "description": "Search query" } }, "required": ["query"] } } } },
        "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/medium/user": {
      "post": {
        "operationId": "mediumUser",
        "summary": "Medium user profile & stats",
        "tags": ["Medium"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "username": { "type": "string", "description": "Medium username" } }, "required": ["username"] } } } },
        "responses": { "200": { "description": "User profile", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/spotify/track": {
      "post": {
        "operationId": "spotifyTrack",
        "summary": "Spotify track details",
        "tags": ["Spotify"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Spotify track ID" } }, "required": ["id"] } } } },
        "responses": { "200": { "description": "Track details", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/spotify/artist": {
      "post": {
        "operationId": "spotifyArtist",
        "summary": "Spotify artist info & top tracks",
        "tags": ["Spotify"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Spotify artist ID" } }, "required": ["id"] } } } },
        "responses": { "200": { "description": "Artist info", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    },
    "/api/spotify/search": {
      "post": {
        "operationId": "spotifySearch",
        "summary": "Search Spotify tracks/artists/albums",
        "tags": ["Spotify"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string", "description": "Search query" } }, "required": ["query"] } } } },
        "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment Required" } }
      }
    }
  }
}
