FastCards is an easy-to-use API written in Express for fetching flashcards on a given topic. All flashcards provided by the public API are fetched from Cram. Test out a request at the homepage.
To use the API, request the following URL.
POST
https://fastcardsapi.herokuapp.com/api/flashcards
Endpoints:
POST /api/flashcards
This endpoint requests flashcards of some provided topic.
query
(required): A string containing the flashcard subject/topic.max
(optional): A number specifying the maximum number of flashcards to return. If not provided, the default is 10.
Example Request:
{
"query": "hematology",
"max": 5
}
A successful response will contain 3 keys:
from_url
: The Cram URL from which the flashcards were fetched.number_of_flashcards
: The number of flashcards provided. The value will be <=max
.flashcards
: List of flashcards. Each list element contains aquestion
andanswer
key.
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"from_url": "https://www.cram.com/flashcards/hematology-2282407",
"number_of_flashcards": 5,
"flashcards": [{
"question": "What are conditions associated with elliptocytes/Ovalcytes",
"answer": "Hereditary Elliptocytosis"
}, {
"question": "What are conditions associated with Schistocytes?",
"answer": "Microangiopathic hemolytic anemias such as:"
}, {
"question": "What are conditions associated with Target Cells on blood film?",
"answer": "Liver disease, Sickle Cell disease, thalassemia, iron deficiency, asplenia"
}, {
"question": "What are conditions associated with teardrop cell/dacrocytes on blood film?",
"answer": "Myelofibrosis"
}, {
"question": "Acanthocytes, which conditions",
"answer": "Severe liver disease, starvation/anorexia, post-splenectomy"
}]
}
Requests are rate-limited to 20 requests/minute. If more requests are required for your project, feel free to contact me on discord (Treephones#4601) to (maybe) get an unlimited key.
FastCards is licensed under the MIT license.