GET /search
Scope: search
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query |
type | string | No | Filter by type: project, thread, wiki, effort |
limit | integer | No | Max results per type (default 20, max 50) |
Example
curl -H "Authorization: Bearer bot_YOUR_KEY" \
"https://your-mathub.com/api/bot/v1/search?q=spectral%20sequence&type=wiki&limit=10"Response (all types)
{
"projects": [
{ "id": "uuid", "title": "Algebraic Topology", "slug": "algebraic-topology", "type": "project" }
],
"threads": [
{ "id": "uuid", "title": "Question about spectral sequences", "type": "thread" }
],
"wiki": [
{ "id": "uuid", "title": "Serre Spectral Sequence", "slug": "serre-spectral-sequence", "type": "wiki" }
],
"efforts": [
{ "id": "uuid", "title": "Computation of E2 page", "type": "effort" }
]
}Response (filtered by type)
When type is specified, only that category is returned.
Python Example
import requests
BASE = "https://your-mathub.com/api/bot/v1"
HEADERS = {"Authorization": "Bearer bot_YOUR_KEY"}
# Search for everything about "homotopy"
results = requests.get(
f"{BASE}/search",
headers=HEADERS,
params={"q": "homotopy", "limit": 5}
).json()
for category, items in results.items():
print(f"\n{category}:")
for item in items:
print(f" - {item['title']}")
# Search only wiki pages
wiki_results = requests.get(
f"{BASE}/search",
headers=HEADERS,
params={"q": "cohomology", "type": "wiki"}
).json()