{
  "openapi": "3.1.0",
  "info": {
    "title": "x402 Multi Hub",
    "version": "1.0.0",
    "description": "16 paid API endpoints: Job Search, Local Business, Telegram, YouTube, Shopee. Powered by x402 crypto micropayments on Base mainnet.",
    "x-guidance": "POST endpoints with JSON body. All endpoints require payment via x402 protocol (USDC on Base). Include x-payment header for paid access.",
    "contact": { "email": "sna4an@users.noreply.github.com" }
  },
  "servers": [{ "url": "https://x402-multi-hub.vercel.app" }],
  "paths": {
    "/api/search-jobs": {
      "post": {
        "operationId": "searchJobs",
        "summary": "Search job listings from multiple sources",
        "tags": ["Job Search"],
        "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", "minLength": 1, "description": "Job search query" },
                  "page": { "type": "string", "description": "Page number (default: 1)" },
                  "num_pages": { "type": "string", "description": "Number of pages (1-20)" },
                  "date_posted": { "type": "string", "description": "Filter: all, today, 3days, week, month" },
                  "remote_jobs_only": { "type": "string", "description": "Filter remote jobs only" },
                  "employment_types": { "type": "string", "description": "FULLTIME, PARTTIME, CONTRACTOR, INTERN" }
                },
                "required": ["query"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object" } } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/job-details": {
      "post": {
        "operationId": "jobDetails",
        "summary": "Get full job details by job ID",
        "tags": ["Job Search"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_id": { "type": "string", "minLength": 1, "description": "Job ID from search results" }
                },
                "required": ["job_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/job-salary": {
      "post": {
        "operationId": "jobSalary",
        "summary": "Get salary estimates for job titles",
        "tags": ["Job Search"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_title": { "type": "string", "minLength": 1, "description": "Job title to search" },
                  "location": { "type": "string", "description": "Location (city, state, country)" },
                  "location_type": { "type": "string", "description": "ANY, CITY, STATE, COUNTRY" }
                },
                "required": ["job_title"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/search-flags": {
      "post": {
        "operationId": "searchFlags",
        "summary": "Get available job search filter flags",
        "tags": ["Job Search"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/estimated-salary": {
      "post": {
        "operationId": "estimatedSalary",
        "summary": "Get estimated salary by title and location",
        "tags": ["Job Search"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_title": { "type": "string", "minLength": 1, "description": "Job title" },
                  "location": { "type": "string", "description": "Location" },
                  "location_type": { "type": "string", "description": "ANY, CITY, STATE, COUNTRY" },
                  "years_of_experience": { "type": "string", "description": "LESS_THAN_ONE, ONE_TO_THREE, etc." }
                },
                "required": ["job_title"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/search-businesses": {
      "post": {
        "operationId": "searchBusinesses",
        "summary": "Search local businesses by query and location",
        "tags": ["Local Business"],
        "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", "minLength": 1, "description": "Business search query" },
                  "lat": { "type": "string", "description": "Latitude" },
                  "lng": { "type": "string", "description": "Longitude" },
                  "limit": { "type": "string", "description": "Max results (default: 20)" },
                  "zoom": { "type": "string", "description": "Map zoom level" },
                  "language": { "type": "string", "description": "Language code (en, id, etc.)" },
                  "region": { "type": "string", "description": "Region code (us, id, etc.)" }
                },
                "required": ["query"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object" } } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/business-details": {
      "post": {
        "operationId": "businessDetails",
        "summary": "Get detailed business information",
        "tags": ["Local Business"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.120000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "business_id": { "type": "string", "minLength": 1, "description": "Business ID from search results" },
                  "extract_emails_and_contacts": { "type": "boolean", "description": "Extract emails and contacts" }
                },
                "required": ["business_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/search-telegram": {
      "post": {
        "operationId": "searchTelegram",
        "summary": "Search Telegram groups and channels",
        "tags": ["Telegram"],
        "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", "minLength": 1, "description": "Search query for Telegram groups/channels" },
                  "page": { "type": "string", "description": "Page number" },
                  "limit": { "type": "string", "description": "Max results" }
                },
                "required": ["query"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object" } } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/youtube-to-telegram": {
      "post": {
        "operationId": "youtubeToTelegram",
        "summary": "Upload YouTube video to Telegram",
        "tags": ["YouTube"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.200000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "video_id": { "type": "string", "minLength": 1, "description": "YouTube video ID" },
                  "quality": { "type": "string", "description": "best, worst, 1080p, 720p, 480p, 360p" },
                  "file_format": { "type": "string", "description": "m4a, mp3, mp4" },
                  "webhook_url": { "type": "string", "description": "Webhook URL for async notification" }
                },
                "required": ["video_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/youtube-to-server": {
      "post": {
        "operationId": "youtubeToServer",
        "summary": "Download YouTube video to server",
        "tags": ["YouTube"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.150000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "video_id": { "type": "string", "minLength": 1, "description": "YouTube video ID" },
                  "quality": { "type": "string", "description": "best, worst, 1080p, 720p, 480p, 360p" },
                  "file_format": { "type": "string", "description": "m4a, mp3, mp4" },
                  "webhook_url": { "type": "string", "description": "Webhook URL for async notification" }
                },
                "required": ["video_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/youtube-video-stream": {
      "post": {
        "operationId": "youtubeVideoStream",
        "summary": "Get YouTube video stream URL",
        "tags": ["YouTube"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "video_id": { "type": "string", "minLength": 1, "description": "YouTube video ID" }
                },
                "required": ["video_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/youtube-live-hls": {
      "post": {
        "operationId": "youtubeLiveHls",
        "summary": "Get YouTube live stream HLS URL",
        "tags": ["YouTube"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "video_id": { "type": "string", "minLength": 1, "description": "YouTube live video ID" }
                },
                "required": ["video_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/youtube-live-mp4": {
      "post": {
        "operationId": "youtubeLiveMp4",
        "summary": "Get YouTube live stream MP4 URL",
        "tags": ["YouTube"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "video_id": { "type": "string", "minLength": 1, "description": "YouTube live video ID" }
                },
                "required": ["video_id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/search-shopee": {
      "post": {
        "operationId": "searchShopee",
        "summary": "Search Shopee products by keyword",
        "tags": ["Shopee"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "keyword": { "type": "string", "minLength": 1, "description": "Product search keyword" },
                  "country": { "type": "string", "description": "Country code (sg, id, th, etc.)" },
                  "page": { "type": "string", "description": "Page number" },
                  "sort_by": { "type": "string", "description": "Sort: relevance, price_asc, price_desc, etc." }
                },
                "required": ["keyword"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object" } } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/shopee-shop": {
      "post": {
        "operationId": "shopeeShop",
        "summary": "Get Shopee shop info and products",
        "tags": ["Shopee"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.080000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shop": { "type": "string", "minLength": 1, "description": "Shop ID" },
                  "country": { "type": "string", "description": "Country code" }
                },
                "required": ["shop"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object" } } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/shopee-category": {
      "post": {
        "operationId": "shopeeCategory",
        "summary": "Browse Shopee products by category",
        "tags": ["Shopee"],
        "x-payment-info": { "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" }, "protocols": [{ "x402": {} }] },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": { "type": "string", "minLength": 1, "description": "Category ID" },
                  "country": { "type": "string", "description": "Country code" }
                },
                "required": ["category"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object" } } } } } } },
          "402": { "description": "Payment Required" }
        }
      }
    }
  }
}
