Skip to content

Instantly share code, notes, and snippets.

@pay-skill
Created April 17, 2026 19:49
Show Gist options
  • Select an option

  • Save pay-skill/ebb5382a0e7cfe22037c18f321f920a5 to your computer and use it in GitHub Desktop.

Select an option

Save pay-skill/ebb5382a0e7cfe22037c18f321f920a5 to your computer and use it in GitHub Desktop.
x402 catalog #286 — Web Search API bounty spec

[x402 catalog #286] Web Search API

Bounty: $5 USDC on ClawTask (link in 0xWork posting). The real reward is owning the deployed API forever — every x402 agent calling it pays YOUR wallet on Base mainnet.


Problem

Every AI agent searches the web. The single highest-frequency paid operation in the catalog.

Endpoints (you choose paths; names below are functional)

  1. Searchquery + optional filters (region, language, date range, site) → ranked results. Each result: title, url, snippet, published_date, source_domain, rank. Pagination via cursor or offset. Real results from a real search index.

  2. Image searchquery + filters → ranked image results with thumbnail_url, full_url, width, height, source_page_url, alt_text.

  3. Video searchquery → ranked video results with title, url, thumbnail, duration_seconds, platform (youtube/vimeo/etc.), published_date.

  4. News searchquery + date range + language → ranked recent news with title, url, snippet, source, published_at, language.

  5. Site-restricted searchquery + domain → same as #1 but only from that domain.

Data Source (reseller path)

Wrap one of: Brave Search API, Serper, SerpAPI, Tavily, Exa, or your own crawl. Upstream cost eats into margin; price accordingly.

Endpoint-Specific Acceptance

  • Different queries return different results (not hardcoded)
  • Region filter changes results (compare 'news' in US vs JP)
  • Date filter excludes old results
  • Site-restricted filter honored
  • Snippets are real (substring appears in source page)
  • Pagination works (cursor or offset advances)
  • Response under 3 seconds typical

Suggested Pricing

  • Search / news / image / video / site-restricted: $0.005-$0.02 per query

Why Build This

The $5 bounty is setup money. The real reward: you OWN the deployed API. Every x402 agent that hits your endpoint pays YOUR wallet in USDC on Base mainnet. No intermediary. No revenue share with us. Pay-skill runs the discovery layer + facilitator; you run the service and keep 100% of the per-call stream. Reseller-friendly: wrap any upstream data source/model; the x402 interface IS the value-add.

NO FAKE DATA

Reviewers will call every endpoint with multiple real inputs. Different inputs must produce different, correct outputs. Static responses, lorem-ipsum, randomized fake values, or endpoints that ignore inputs will be rejected immediately.

Acceptance (all must pass)

  1. Network: Base mainnet (chain 8453). NOT testnet, NOT another chain.
  2. HTTPS endpoint. No HTTP, no IP literal, no localhost.
  3. A successful x402 round-trip: unpaid request returns HTTP 402 with valid x402 headers (scheme, network, amount, payTo, settlement, facilitator). After payment, returns HTTP 200 with REAL data.
  4. settlement: "tab" on every paid route. (NOT direct — micropayments. Direct settlement requires $1+ per call which doesn't fit this catalog's pricing.)
  5. pay discover <keyword> finds the API. Heartbeat configured with name, description, keywords, category.
  6. Each endpoint has a filled info block (Bazaar extension) with real example inputs + outputs. No "string" placeholders, no TODO.
  7. Endpoint-specific acceptance criteria above all pass.
  8. Stays live during the 48h verification window after submission.
  9. No catalog disqualifiers: same response for all inputs, requires auth beyond x402, illegal/harmful content, duplicate of another submission.

Reference Tab-Settlement YAML Snippet

listen: ":8402"
proxy:
  target: "http://localhost:8080"
facilitator: "https://pay-skill.com/x402"
routes:
  - path: "/your-endpoint"
    price: "0.01"
    settlement: "tab"             # <-- required
    description: "What this endpoint does"
    info:
      input:
        type: "http"
        method: "GET"
        queryParams:
          q: { type: "string", description: "..." }
      output:
        type: "json"
        example:
          field: "real example value"
discovery:
  discoverable: true
  base_url: "https://your-api.example.com"
  name: "Your API Name"
  description: "What your API does"
  keywords: ["..."]
  category: "..."

Proof of Work (include in submission)

  1. Public HTTPS URL of your API
  2. Your Base mainnet wallet address (where per-call USDC lands)
  3. ONE successful round-trip showing 402 → payment → 200 with real data. Use whatever invocation makes sense (pay request works like curl). Paste the command + the response.

Build References

Choose your integration approach (pay-gate sidecar OR app middleware):

Design + verification:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment