REST APISearch

Search categories and markets

GET
/search

Full-text search across categories and markets. Returns separate arrays for each type, sorted by relevance.

Authorization

ApiKeyAuth
headerx-api-key<token>

API key authentication via the x-api-key header.

Query Parameters

query*string

The text to search for. It is matched against titles, market questions and tag names.

Lengthlength <= 256
includeResolved?boolean

Whether to also return resolved categories and the markets in them. Defaults to false.

limit?integer

Most results of each type to return, from 1 to 50. Defaults to 10.

Formatuint64
includeStats?boolean

Whether to fill in stats with volume and liquidity figures. Defaults to false, which leaves stats null.

Response Body

application/json; charset=utf-8
  1. response

Response for GET /v1/search

success*boolean
data*

Search results data

Example Request
curl -X GET 'https://api.predict.fun/v1/search?query=string'
Example Response
{  "success": true,  "data": {    "categories": [      {        "id": 0,        "slug": "string",        "title": "string",        "shortTitle": "string",        "seriesSlug": "string",        "description": "string",        "imageUrl": "string",        "isNegRisk": true,        "protocol": "LEGACY",        "isYieldBearing": true,        "negRiskOnChainId": "string",        "marketVariant": "DEFAULT",        "variantData": {          "type": "CRYPTO_UP_DOWN",          "priceFeedProvider": "PYTH",          "startPrice": 0.1,          "endPrice": 0.1,          "priceFeedId": "string",          "priceFeedSymbol": "string"        },        "variantDetails": {          "sports": {            "provider": "PREDICT_SPORTS",            "providerEventId": "string",            "teams": [              {                "id": 0,                "name": "string",                "abbreviation": "string",                "providerTeamId": "string",                "isHome": true,                "record": {                  "wins": 0,                  "losses": 0,                  "draws": 0,                  "overtimeLosses": 0                },                "color": "string"              }            ],            "scoreboard": {              "source": "GRID",              "bestOf": 0,              "isLive": true,              "finished": true,              "currentGame": 0,              "period": "string",              "clock": "string",              "score": [                {                  "teamId": 0,                  "score": 0                }              ],              "games": [                {                  "gameNumber": 0,                  "isLive": true,                  "finished": true,                  "winnerTeamId": 0,                  "scores": [                    {                      "teamId": 0,                      "score": 0                    }                  ]                }              ]            }          },          "crypto": {            "priceFeedProvider": "PYTH",            "priceFeedId": "string",            "priceFeedSymbol": "string",            "startPrice": 0.1,            "endPrice": 0.1          },          "upDown": {            "priceFeedProvider": "PYTH",            "priceFeedId": "string",            "priceFeedSymbol": "string",            "startPrice": 0.1,            "endPrice": 0.1          },          "tweet": {            "xAccountUsername": "string",            "tweetCount": 0          }        },        "createdAt": "string",        "publishedAt": "string",        "markets": [          {            "id": 0,            "imageUrl": "string",            "title": "string",            "question": "string",            "description": "string",            "tradingStatus": "OPEN",            "status": "REGISTERED",            "isVisible": true,            "isNegRisk": true,            "isYieldBearing": true,            "feeRateBps": 0,            "makerFeeBps": 0,            "resolution": {              "name": "string",              "indexSet": 0,              "onChainId": "string",              "status": "WON",              "bestBid": {                "price": 0.1,                "size": 0.1              },              "bestAsk": {                "price": 0.1,                "size": 0.1              },              "team": {                "id": 0,                "name": "string",                "abbreviation": "string",                "alias": "string",                "league": "string"              },              "variantData": {                "type": "ESPORTS_DOTA2",                "provider": "PREDICT_SPORTS",                "team": {                  "id": 0,                  "name": "string",                  "abbreviation": "string",                  "providerTeamId": "string",                  "isHome": true,                  "record": {                    "wins": 0,                    "losses": 0,                    "draws": 0,                    "overtimeLosses": 0                  },                  "color": "string"                }              },              "variantDetails": {                "sports": {                  "provider": "PREDICT_SPORTS",                  "team": {                    "id": 0,                    "name": "string",                    "abbreviation": "string",                    "providerTeamId": "string",                    "isHome": true,                    "record": {                      "wins": 0,                      "losses": 0,                      "draws": 0,                      "overtimeLosses": 0                    },                    "color": "string"                  }                }              }            },            "oracleQuestionId": "string",            "conditionId": "string",            "resolverAddress": "string",            "outcomes": [              {                "name": "string",                "indexSet": 0,                "onChainId": "string",                "status": "WON",                "bestBid": {                  "price": 0.1,                  "size": 0.1                },                "bestAsk": {                  "price": 0.1,                  "size": 0.1                },                "team": {                  "id": 0,                  "name": "string",                  "abbreviation": "string",                  "alias": "string",                  "league": "string"                },                "variantData": {                  "type": "ESPORTS_DOTA2",                  "provider": "PREDICT_SPORTS",                  "team": {                    "id": 0,                    "name": "string",                    "abbreviation": "string",                    "providerTeamId": "string",                    "isHome": true,                    "record": {                      "wins": 0,                      "losses": 0,                      "draws": 0,                      "overtimeLosses": 0                    },                    "color": "string"                  }                },                "variantDetails": {                  "sports": {                    "provider": "PREDICT_SPORTS",                    "team": {                      "id": 0,                      "name": "string",                      "abbreviation": "string",                      "providerTeamId": "string",                      "isHome": true,                      "record": {                        "wins": 0,                        "losses": 0,                        "draws": 0,                        "overtimeLosses": 0                      },                      "color": "string"                    }                  }                }              }            ],            "questionIndex": 0,            "spreadThreshold": 0.1,            "shareThreshold": 0,            "isBoosted": true,            "boostStartsAt": "string",            "boostEndsAt": "string",            "polymarketConditionIds": [              "string"            ],            "kalshiMarketTicker": "string",            "categorySlug": "string",            "seriesSlug": "string",            "createdAt": "string",            "decimalPrecision": 0,            "marketVariant": "DEFAULT",            "variantData": {              "type": "CRYPTO_UP_DOWN",              "priceFeedProvider": "PYTH",              "startPrice": 0.1,              "endPrice": 0.1,              "priceFeedId": "string",              "priceFeedSymbol": "string"            },            "variantDetails": {              "sports": {                "provider": "PREDICT_SPORTS",                "team": {                  "id": 0,                  "name": "string",                  "abbreviation": "string",                  "providerTeamId": "string",                  "isHome": true,                  "record": {                    "wins": 0,                    "losses": 0,                    "draws": 0,                    "overtimeLosses": 0                  },                  "color": "string"                },                "line": 0.1,                "gameNumber": 0              }            },            "team": {              "id": 0,              "name": "string",              "abbreviation": "string",              "alias": "string",              "league": "string"            },            "marketType": "SPORTS_MONEYLINE",            "rewards": {              "current": {                "hourlyRate": 0,                "startsAt": "string",                "endsAt": "string"              },              "schedule": [                {                  "hourlyRate": 0,                  "startsAt": "string",                  "endsAt": "string"                }              ]            }          }        ],        "startsAt": "string",        "endsAt": "string",        "tradingSession": {          "opensAt": "string",          "closesAt": "string"        },        "status": "OPEN",        "isVisible": true,        "resolutionProvider": "PREDICT_DOT_FUN",        "tags": [          {            "id": "string",            "name": "string",            "level": 0,            "parentId": "string",            "makerRebateBps": 0          }        ],        "teams": [          {            "id": 0,            "name": "string",            "abbreviation": "string",            "alias": "string",            "league": "string"          }        ],        "parentSlug": "string",        "stats": {          "totalLiquidityUsd": 0.1,          "volumeTotalUsd": 0.1,          "volume24hUsd": 0.1,          "holdersCount": 0        }      }    ],    "markets": [      {        "id": 0,        "imageUrl": "string",        "title": "string",        "question": "string",        "description": "string",        "tradingStatus": "OPEN",        "status": "REGISTERED",        "isVisible": true,        "isNegRisk": true,        "isYieldBearing": true,        "feeRateBps": 0,        "makerFeeBps": 0,        "resolution": {          "name": "string",          "indexSet": 0,          "onChainId": "string",          "status": "WON",          "bestBid": {            "price": 0.1,            "size": 0.1          },          "bestAsk": {            "price": 0.1,            "size": 0.1          },          "team": {            "id": 0,            "name": "string",            "abbreviation": "string",            "alias": "string",            "league": "string"          },          "variantData": {            "type": "ESPORTS_DOTA2",            "provider": "PREDICT_SPORTS",            "team": {              "id": 0,              "name": "string",              "abbreviation": "string",              "providerTeamId": "string",              "isHome": true,              "record": {                "wins": 0,                "losses": 0,                "draws": 0,                "overtimeLosses": 0              },              "color": "string"            }          },          "variantDetails": {            "sports": {              "provider": "PREDICT_SPORTS",              "team": {                "id": 0,                "name": "string",                "abbreviation": "string",                "providerTeamId": "string",                "isHome": true,                "record": {                  "wins": 0,                  "losses": 0,                  "draws": 0,                  "overtimeLosses": 0                },                "color": "string"              }            }          }        },        "oracleQuestionId": "string",        "conditionId": "string",        "resolverAddress": "string",        "outcomes": [          {            "name": "string",            "indexSet": 0,            "onChainId": "string",            "status": "WON",            "bestBid": {              "price": 0.1,              "size": 0.1            },            "bestAsk": {              "price": 0.1,              "size": 0.1            },            "team": {              "id": 0,              "name": "string",              "abbreviation": "string",              "alias": "string",              "league": "string"            },            "variantData": {              "type": "ESPORTS_DOTA2",              "provider": "PREDICT_SPORTS",              "team": {                "id": 0,                "name": "string",                "abbreviation": "string",                "providerTeamId": "string",                "isHome": true,                "record": {                  "wins": 0,                  "losses": 0,                  "draws": 0,                  "overtimeLosses": 0                },                "color": "string"              }            },            "variantDetails": {              "sports": {                "provider": "PREDICT_SPORTS",                "team": {                  "id": 0,                  "name": "string",                  "abbreviation": "string",                  "providerTeamId": "string",                  "isHome": true,                  "record": {                    "wins": 0,                    "losses": 0,                    "draws": 0,                    "overtimeLosses": 0                  },                  "color": "string"                }              }            }          }        ],        "questionIndex": 0,        "spreadThreshold": 0.1,        "shareThreshold": 0,        "isBoosted": true,        "boostStartsAt": "string",        "boostEndsAt": "string",        "polymarketConditionIds": [          "string"        ],        "kalshiMarketTicker": "string",        "categorySlug": "string",        "seriesSlug": "string",        "createdAt": "string",        "decimalPrecision": 0,        "marketVariant": "DEFAULT",        "variantData": {          "type": "CRYPTO_UP_DOWN",          "priceFeedProvider": "PYTH",          "startPrice": 0.1,          "endPrice": 0.1,          "priceFeedId": "string",          "priceFeedSymbol": "string"        },        "variantDetails": {          "sports": {            "provider": "PREDICT_SPORTS",            "team": {              "id": 0,              "name": "string",              "abbreviation": "string",              "providerTeamId": "string",              "isHome": true,              "record": {                "wins": 0,                "losses": 0,                "draws": 0,                "overtimeLosses": 0              },              "color": "string"            },            "line": 0.1,            "gameNumber": 0          }        },        "team": {          "id": 0,          "name": "string",          "abbreviation": "string",          "alias": "string",          "league": "string"        },        "marketType": "SPORTS_MONEYLINE",        "rewards": {          "current": {            "hourlyRate": 0,            "startsAt": "string",            "endsAt": "string"          },          "schedule": [            {              "hourlyRate": 0,              "startsAt": "string",              "endsAt": "string"            }          ]        },        "stats": {          "totalLiquidityUsd": 0.1,          "liquidity3cAskUsd": 0.1,          "volumeTotalUsd": 0.1,          "volume24hUsd": 0.1        }      }    ]  }}