# x402-factory Prediction Market Search

> x402-factory Prediction Market Search is a paid API for AI agents from x402-factory.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Full-text search over a canonical prediction market catalog, returning slugs, blended probabilities, and match confidence scores for matching markets.

## Facts

- Endpoint: GET https://x402-factory.com/v1/probability/search
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-factory-prediction-market-search-8247da1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eYnLZ_s0_KNdmtQS0BjhQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-factory-prediction-market-search-8247da1b
```

Example prompt: Search the prediction market catalog for markets about 'US presidential election 2024' in the politics category and give me the top 5 results with their current probabilities and slugs.

## When to prefer this

Use this endpoint when you need to discover prediction markets by topic or keyword before calling more specific endpoints (probability time series, venue odds, depth). It is the entry point for finding market slugs required by other x402-factory endpoints. Prefer this over browsing by category when the user has a specific topic in mind.

## Known failure modes

- Query string too short (< 2 chars) or too long (> 200 chars) returns validation error
- Invalid category enum value causes request rejection
- Empty result set returns 200 with suggestion field instead of error
- Payment failure (x402 protocol) blocks access entirely
- Network timeout if full-text search index is under heavy load

## How this service works

Find prediction markets by free-text query; returns slugs for other endpoints — Full-text search over the canonical market catalog (Postgres FTS + trigram in live mode). Returns slugs, blended probabilities, and match confidence. Empty result sets return 200 with a suggestion listing valid categories.

## Output

A JSON object with a results array, each item containing the market slug, question text, blended probability (0–1), category, resolution date, and match confidence score. If no markets match, a 200 response is still returned with a suggestion field listing valid categories.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "minLength": 2
      },
      "limit": {
       "type": "integer",
       "default": 5,
       "maximum": 20,
       "minimum": 1
      },
      "category": {
       "enum": [
        "politics",
        "economics",
        "weather",
        "crypto",
        "sports",
        "science-tech",
        "entertainment"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "results"
       ],
       "properties": {
        "results": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "slug",
           "question",
           "probability",
           "category",
           "resolution_date",
           "match_confidence"
          ],
          "properties": {
           "slug": {
            "type": "string"
           },
           "category": {
            "type": "string"
           },
           "question": {
            "type": "string"
           },
           "probability": {
            "type": "number",
            "maximum": 1,
            "minimum": 0
           },
           "resolution_date": {
            "type": "string"
           },
           "match_confidence": {
            "type": "number",
            "maximum": 1,
            "minimum": 0
           }
          },
          "additionalProperties": false
         }
        },
        "suggestion": {
         "type": "string"
        }
       },
       "additionalProperties": false
      },
      "meta": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "results": [
    {
     "slug": "fed-rate-cut-2026-09",
     "category": "economics",
     "question": "Will the Fed cut rates at the September 2026 FOMC meeting?",
     "probability": 0.7301,
     "resolution_date": "2026-09-16",
     "match_confidence": 1
    },
    {
     "slug": "fed-rate-cut-2026-06",
     "category": "economics",
     "question": "Did the Fed cut rates at the June 2026 FOMC meeting?",
     "probability": 0,
     "resolution_date": "2026-06-17",
     "match_confidence": 0.75
    },
    {
     "slug": "ecb-rate-cut-2026-09",
     "category": "economics",
     "question": "Will the ECB cut rates at its September meeting?",
     "probability": 0.5547,
     "resolution_date": "2026-09-10",
     "match_confidence": 0.75
    },
    {
     "slug": "fed-hike-september-2026",
     "category": "economics",
     "question": "Will the Fed raise rates at the September 2026 FOMC meeting?",
     "probability": 0.0488,
     "resolution_date": "2026-09-16",
     "match_confidence": 0.63
    },
    {
     "slug": "fomc-dot-plot-median-shift-2026-09",
     "category": "economics",
     "question": "Will the September 2026 FOMC dot plot shift its median rate path?",
     "probability": 0.5666,
     "resolution_date": "2026-09-16",
     "match_confidence": 0.5
    }
   ]
  },
  "meta": {
   "docs": "https://x402-factory.com/docs/probability.search",
   "sources": [
    "kalshi",
    "polymarket"
   ],
   "version": "1.0.0",
   "endpoint": "/v1/probability/search",
   "data_mode": "live",
   "freshness": "realtime",
   "request_id": "req_00000000",
   "generated_at": "2026-08-21T03:58:58.158Z"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-factory-prediction-market-search-8247da1b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-factory.com](https://www.zero.xyz/host/x402-factory.com/llms.txt)
