cURL
#!/bin/sh
# searchMarkets: Search events by title. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/markets/search?q=bitcoin&limit=5" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""searchMarkets: Search events by title. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.get(f"{BASE}/public/v1/markets/search", params={"q": "bitcoin", "limit": "5"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
r.raise_for_status()
print(r.json())
// searchMarkets: Search events by title. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/markets/search?q=bitcoin&limit=5`, { headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"age_s": 5,
"built_at_ms": 1791266395000,
"results": [
{
"category_group": "crypto",
"event_universal_id": "ev-btc-100k-2026",
"headline_market_id": "mk-btc-100k-2026",
"image_url": null,
"title": "Bitcoin price at year end",
"volume": 1834201.5
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Events
Search events by title
Title search over the published corpus; 503 when no corpus is readable or it is older than its bound.
GET
/
public
/
v1
/
markets
/
search
cURL
#!/bin/sh
# searchMarkets: Search events by title. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/markets/search?q=bitcoin&limit=5" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""searchMarkets: Search events by title. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.get(f"{BASE}/public/v1/markets/search", params={"q": "bitcoin", "limit": "5"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
r.raise_for_status()
print(r.json())
// searchMarkets: Search events by title. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/markets/search?q=bitcoin&limit=5`, { headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"age_s": 5,
"built_at_ms": 1791266395000,
"results": [
{
"category_group": "crypto",
"event_universal_id": "ev-btc-100k-2026",
"headline_market_id": "mk-btc-100k-2026",
"image_url": null,
"title": "Bitcoin price at year end",
"volume": 1834201.5
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Authorization: Bearer tl_live_…
Query Parameters
text matched case-insensitively against event titles, prefix matches first; empty ranks every event by volume
Maximum string length:
200how many results to return
Required range:
1 <= x <= 50Response
Successful Response
seconds since built_at_ms; the route answers 503 instead once this passes its bound
when the searched corpus was built, unix milliseconds
matching events, prefix matches first, then by volume
Show child attributes
Show child attributes