Included
Search the catalogue
GET
/api/v1/searchIncluded- Scope
curriculum:read- Price
- Included once you've topped up
Type-ahead search across subjects, topics, subtopics, community lessons, quizzes, flashcard sets and mocks. Built for a search box, so it answers a partial word.
What to know
- Results are deduplicated by name. The same subtopic exists across many board variants, and an undeduplicated list is forty identical rows.
- `kind` is one of subject, subjectGroup, topic, subtopic, lesson, quiz, flashcards or mock.
- There are no people and no personal content in these results. An API key is not a person, so there is no viewer whose notes or classes could be returned.
- No links are returned. The hrefs the search engine builds point into our own app, so you get the ids and build your own routes.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | The search text. At least 2 characters. |
Example request
curl
curl "https://www.revisiongenie.com/api/v1/search?q=photosynth" \
-H "Authorization: Bearer rgk_live_YOUR_KEY_HERE"Example response
json
{
"query": "photosynth",
"results": [
{
"kind": "subtopic",
"title": "Photosynthesis",
"context": "Bioenergetics",
"subjectId": "6612f0a1c3b4d5e6f7a80912"
},
{
"kind": "lesson",
"title": "Limiting factors in photosynthesis",
"context": "Biology"
}
],
"count": 2
}Errors
Every error carries the same shape: a stable error code to branch on and a message for a human. Codes specific to this endpoint come first.
| Code | Status | When |
|---|---|---|
| topup_required | 402 | This developer account has never topped up. The data endpoints are included from your first top-up onwards, whatever your balance does afterwards. The body carries a top-up link. |
| invalid_query | 400 | The "q" parameter is missing or shorter than 2 characters. |
| invalid_key | 401 | The key is missing, malformed, revoked, expired, or is not a developer key. |
| forbidden | 403 | The key is valid but does not hold the scope this endpoint requires. |
| suspended | 403 | The developer account is suspended. Data reads stop as well as billable calls. |
| rate_limited | 429 | The key went past its ceiling: 120 calls a minute overall, 30 a minute on the paid endpoints. Also returned after repeated failed authentication from one address. |
| server_error | 500 | Something failed on our side. Retry; a paid call is refunded. |