API reference
Timings
Get the start and end time of every word of a Word List Build, for your own player.
A Build from a Word List makes Timings instead of a Reader: when each word you sent starts and ends in the Recording. Use them to highlight words in your own player, with your own layout and text.
Get Timings#
GET/api/v1/builds/{build_id}/timings
Available once the Build is done; the Build's timings_url is this address.
curl
curl https://app.shiurreader.com/api/v1/builds/924d8bea8b804321a12ea5d0a98926a1/timings \
-H "Authorization: Bearer $SHIUR_READER_API_KEY"Python
import os
import requests # or httpx: the calls are the same
API = "https://app.shiurreader.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['SHIUR_READER_API_KEY']}"}
response = requests.get(f"{API}/builds/924d8bea8b804321a12ea5d0a98926a1/timings", headers=HEADERS)
if response.status_code == 409: # not_ready: the Build is not done yet
...
# `words` is the Word List you sent; `position` indexes it (0 = the first word).
for word in response.json()["words"]:
if word["status"] != "not_read":
print(words[word["position"]], word["start"], word["end"])JavaScript
const API = "https://app.shiurreader.com/api/v1";
const HEADERS = { Authorization: `Bearer ${process.env.SHIUR_READER_API_KEY}` };
const response = await fetch(`${API}/builds/924d8bea8b804321a12ea5d0a98926a1/timings`, { headers: HEADERS });
if (response.status === 409) {
// not_ready: the Build is not done yet
}
// `words` is the Word List you sent; `position` indexes it (0 = the first word).
const { words: timings } = await response.json();
for (const word of timings) {
if (word.status !== "not_read") console.log(words[word.position], word.start, word.end);
}{
"build_id": "924d8bea8b804321a12ea5d0a98926a1",
"words": [
{
"position": 0,
"start": 0.42,
"end": 0.98,
"status": "timed"
},
{
"position": 1,
"start": 0.98,
"end": 1.31,
"status": "filled"
},
{
"position": 2,
"start": null,
"end": null,
"status": "not_read"
}
]
}Words#
words has one entry per word you sent, in the same order.
positioninteger- The word's index in your Word List. Word 0 is the first word, so
words[i].position == i. startnumber or null- When the word starts, in seconds from the start of the Recording.
endnumber or null- When the word ends, in seconds from the start of the Recording.
statusstring- How the time was found, below.
Status#
timed- The word was heard in the Recording.
filled- The word was not heard clearly, but sits in a short gap between heard neighbours, so it gets that gap's time.
not_read- The word was not found in the Recording (for example a passage the
speaker skipped).
startandendarenull.
A shiur often explains as it reads, so long stretches of the Recording may belong to no word. Highlight a word
while the playback time is between its start and end, and keep the last word lit in
between.
Errors#
409not_ready- The Build is not done
yet (or it failed). Wait for
done, then ask again. 404not_found- No such Build in your Organization, or it is a PDF Build: those make a Reader, not Timings. Get a Reader's words and times from its Reader data instead.
{
"error": {
"code": "not_ready",
"message": "The Build is running. Timings are ready once it is done."
}
}