Search
Unified public search across tradable markets, event groups, recurring series, and trader profiles. Results include app-facing `href`s so clients can route mixed result types without duplicating route logic.
Search public content
Public/api/searchReturns ranked mixed results for markets, events, series, and public trader profiles. Queries shorter than two characters return an empty result set.
Query parameters
qstringqueryrequiredSearch query.
limitintegerqueryoptionaldefault: 12Maximum results to return. Max 30.
Request
curl "https://api.majjha.fun/api/search"Response
{
"query": "btc",
"results": [
{
"kind": "market",
"id": "mkt_btc5m_a1",
"ticker": "BTC-5MIN-25JUN04T0900-Y",
"title": "BTC above $68,500 at 09:05?",
"subtitle": "Crypto · ACTIVE",
"href": "/markets/BTC-5MIN-25JUN04T0900-Y"
},
{
"kind": "event",
"id": "evt_btc5m_a1",
"ticker": "BTC-5MIN-25JUN04T0900",
"title": "BTC 5-minute close at 09:05",
"subtitle": "Event · ACTIVE",
"href": "/events/BTC-5MIN-25JUN04T0900"
},
{
"kind": "tag",
"id": "tag_btc",
"ticker": "bitcoin",
"title": "Bitcoin",
"subtitle": "24 markets",
"href": "/tags/bitcoin"
}
]
}Search public content (Gamma shape)
Public/public-searchCurrent Gamma-compatible search alias used by the public SDK. Returns separate `events`, `tags`, `profiles`, and `pagination` fields instead of the native mixed `results` array.
Query parameters
qstringqueryrequiredSearch query.
limit_per_typeintegerqueryoptionaldefault: 10Maximum events, tags, and profiles to return per type. Alias: `limitPerType`.
pageintegerqueryoptionaldefault: 11-based SDK page parameter. Pages after 1 currently return an empty result set with `hasMore: false`.
cachebooleanqueryoptionalAccepted for current Gamma SDK compatibility.
events_statusstringqueryoptionalEvent/market status filter. Supports active/open/live and closed/ended/resolved aliases. Alias: `eventsStatus`.
events_tagstring[]queryoptionalRepeated or comma-separated tag ids/slugs/names that event/market results must include. Alias: `eventsTag`.
keep_closed_marketsintegerqueryoptionalWhen explicitly `0`, closed market/event rows are filtered out. Alias: `keepClosedMarkets`.
sortstringqueryoptionalAccepted current Gamma sort hint. PredictMax still ranks by relevance first.
ascendingbooleanqueryoptionalAccepted current Gamma sort direction hint.
search_tagsbooleanqueryoptionaldefault: trueWhen false, omits tag result buckets. Alias: `searchTags`.
search_profilesbooleanqueryoptionaldefault: trueWhen false, omits profile result buckets. Alias: `searchProfiles`.
recurrencestringqueryoptionalFilters recurring event/series-backed results by local series frequency.
exclude_tag_idstring[]queryoptionalRepeated or comma-separated tag ids/slugs/names to exclude from event/market results. Alias: `excludeTagId`.
optimizedbooleanqueryoptionalAccepted for current Gamma SDK compatibility.
Request
curl "https://api.majjha.fun/public-search"Response
{
"events": [
{
"id": "mkt_btc5m_a1",
"ticker": "BTC-5MIN-25JUN04T0900-Y",
"slug": "BTC-5MIN-25JUN04T0900-Y",
"title": "BTC above $68,500 at 09:05?",
"subtitle": "Crypto · ACTIVE",
"active": true,
"commentsEnabled": true
}
],
"tags": [
{ "id": "tag_btc", "slug": "bitcoin", "label": "Bitcoin" }
],
"profiles": [
{ "id": "usr_1", "name": "Alice", "pseudonym": "alice", "displayUsernamePublic": true }
],
"pagination": { "hasMore": false, "totalResults": 3 }
}- →Compatibility aliases: `/api/public-search` and `/api/gamma/public-search`.