{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Kiosk B2A API",
    "version": "2.3.0",
    "description": "12-in-1 Pay-Per-Call Intelligence Supermarket for AI Agents: Social Search, Business Leads, Clean Web Extraction, Smart Contract Security, DeFi Order-Flow Alpha, Whale Wallet Profiler, Prediction Markets, DeFi Yields, Domain Intelligence, Package CVE Audits, Academic Research, and GitHub Intelligence via x402 v2 (Base USDC) and MCP.",
    "contact": {
      "name": "Agent Kiosk Support",
      "email": "ralf9090@users.noreply.github.com",
      "url": "https://github.com/ralf9090/agent-kiosk"
    },
    "x-guidance": "Call any /v1/* endpoint via POST with JSON body. Unauthenticated requests return an HTTP 402 challenge with PAYMENT-REQUIRED header on Base (eip155:8453)."
  },
  "servers": [
    {
      "url": "https://agent-kiosk.vercel.app"
    }
  ],
  "paths": {
    "/v1/social-search": {
      "post": {
        "operationId": "social_search",
        "summary": "Real-time social media search (Reddit, HackerNews) returning clean JSON & Markdown for AI agents.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Search keywords or topic (e.g., 'best AI coding agents', 'Stripe alternatives')"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "all",
                      "reddit",
                      "hn"
                    ],
                    "description": "Target social platform (default: 'all')"
                  },
                  "limit": {
                    "type": "number",
                    "description": "Number of results to return (1-25, default: 10)"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/maps-leads": {
      "post": {
        "operationId": "maps_leads",
        "summary": "Local business lead extractor returning company name, phone, website, address, and coordinates.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Business type or name (e.g., 'cafe', 'dentist', 'lawyer')"
                  },
                  "location": {
                    "type": "string",
                    "description": "City, region, or country (e.g., 'San Francisco', 'London', 'Istanbul')"
                  },
                  "limit": {
                    "type": "number",
                    "description": "Number of leads to return (1-25, default: 10)"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.03 USDC on Base)"
          }
        }
      }
    },
    "/v1/web-extract": {
      "post": {
        "operationId": "web_extract",
        "summary": "Clean webpage-to-Markdown extractor with automatic Prompt Injection trap scanning for AI agents.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Full URL to extract (must start with http:// or https://)"
                  },
                  "max_length": {
                    "type": "number",
                    "description": "Maximum markdown character length to return (500-25000, default: 8000)"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.01 USDC on Base)"
          }
        }
      }
    },
    "/v1/security-audit": {
      "post": {
        "operationId": "security_audit",
        "summary": "Pre-flight security scanner for 0x smart contracts/tokens (honeypot, tax, liquidity via GoPlus & DexScreener) and URLs (phishing & prompt injection).",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "description": "0x... token/contract address OR https://... URL to audit"
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "base",
                      "ethereum",
                      "bsc",
                      "arbitrum",
                      "polygon",
                      "optimism"
                    ],
                    "description": "Blockchain network when target is a 0x address (default: 'base')"
                  }
                },
                "required": [
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/token-alpha": {
      "post": {
        "operationId": "token_alpha",
        "summary": "Real-time DEX order-flow & token alpha signal analyzer: buy vs. sell pressure, liquidity depth, volume velocity, and top pools.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Token symbol (e.g., 'AERO', 'PEPE', 'VIRTUAL') or contract address (0x...)"
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "all",
                      "base",
                      "ethereum",
                      "solana",
                      "arbitrum",
                      "bsc"
                    ],
                    "description": "Optional chain filter (default: 'all')"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/domain-intel": {
      "post": {
        "operationId": "domain_intel",
        "summary": "B2B company & domain intelligence: DNS records, MX email provider, SaaS tech stack fingerprints from TXT/NS, RDAP registration, and active subdomains.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Target company domain or URL (e.g., 'stripe.com', 'vercel.com')"
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/package-audit": {
      "post": {
        "operationId": "package_audit",
        "summary": "Open-source package & CVE vulnerability scanner for coding agents (npm, PyPI, crates.io) powered by Google OSV.dev.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Package name (e.g., 'lodash', 'express', 'requests', 'tokio')"
                  },
                  "ecosystem": {
                    "type": "string",
                    "enum": [
                      "npm",
                      "pypi",
                      "crates.io"
                    ],
                    "description": "Package registry ecosystem (default: 'npm')"
                  },
                  "version": {
                    "type": "string",
                    "description": "Optional specific version to audit (defaults to latest version)"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.01 USDC on Base)"
          }
        }
      }
    },
    "/v1/academic-search": {
      "post": {
        "operationId": "academic_search",
        "summary": "Peer-reviewed scientific paper & preprint search (OpenAlex + arXiv) returning citations, reconstructed abstracts, and direct Open-Access PDF links.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Research topic or scientific query (e.g., 'autonomous AI agents', 'zero knowledge proofs')"
                  },
                  "limit": {
                    "type": "number",
                    "description": "Number of papers to return (1-15, default: 5)"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/wallet-profiler": {
      "post": {
        "operationId": "wallet_profiler",
        "summary": "Multi-chain whale & wallet portfolio profiler across Base, Ethereum, Arbitrum, and Polygon: live USDC & ETH balances, transaction counts, and smart contract detection.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "0x... 40-hex EVM wallet or contract address to profile"
                  }
                },
                "required": [
                  "address"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.03 USDC on Base)"
          }
        }
      }
    },
    "/v1/prediction-markets": {
      "post": {
        "operationId": "prediction_markets",
        "summary": "Live prediction market odds & implied event probabilities (%) from Polymarket and Manifold Markets for macro, crypto, tech, and politics.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Event or topic to search (e.g., 'bitcoin', 'fed rate', 'AI', 'election')"
                  },
                  "limit": {
                    "type": "number",
                    "description": "Number of markets to return (1-15, default: 5)"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/defi-yields": {
      "post": {
        "operationId": "defi_yields",
        "summary": "DeFi highest APY & yield radar powered by DeFiLlama: ranks top liquidity and lending pools by APY and TVL for any token and chain.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "Token symbol to earn yield on (default: 'USDC')"
                  },
                  "chain": {
                    "type": "string",
                    "description": "Blockchain name such as 'Base', 'Ethereum', 'Arbitrum', 'Solana', or 'all' (default: 'Base')"
                  },
                  "min_tvl_usd": {
                    "type": "number",
                    "description": "Minimum pool TVL in USD for safety filtering (default: 100000)"
                  },
                  "limit": {
                    "type": "number",
                    "description": "Number of top pools to return (1-20, default: 5)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.02 USDC on Base)"
          }
        }
      }
    },
    "/v1/github-intel": {
      "post": {
        "operationId": "github_intel",
        "summary": "GitHub repository & open-source competitive intelligence: stars, forks, open issues, latest releases, and top repositories by topic.",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {}
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Repository 'owner/repo' (e.g., 'vercel/next.js') OR search topic (e.g., 'mcp server')"
                  },
                  "limit": {
                    "type": "number",
                    "description": "Number of repositories when searching by topic (1-15, default: 5)"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful structured agent response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "payment_mode": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "ok",
                    "data"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 v2 Payment Required ($0.01 USDC on Base)"
          }
        }
      }
    }
  }
}