This API provides information about the current Daf Yomi (daily Talmud study page), including the masechta (tractate), daf number, cycle information, and upcoming masechta schedule.
https://www.shas.org/daf-yomi-api/
Retrieve the current Daf Yomi information.
No parameters required - Returns today's daf automatically based on server time.
Optional: Use the date parameter to get the daf for any specific date.
| Parameter | Type | Required | Description |
|---|---|---|---|
date |
string | Optional | Date in YYYY-MM-DD format (e.g., 2025-01-15). If omitted, returns today's daf. |
application/json
| Field | Type | Description |
|---|---|---|
current_daf |
object | Information about today's daf |
current_daf.masechta |
string | Name of the current masechta |
current_daf.key |
string | Normalized key for other API usage (lowercase, hyphenated) |
current_daf.daf |
integer | Current daf number (starts from 2) |
cycle |
object | Information about the current Daf Yomi cycle |
cycle.number |
integer | Current cycle number (1st cycle started in 1923) |
cycle.label |
string | Formatted cycle label (e.g., "14th cycle") |
next_masechta |
object | Information about the upcoming masechta |
next_masechta.name |
string | Name of the next masechta to begin |
next_masechta.key |
string | Normalized key for other API usage (lowercase, hyphenated) |
next_masechta.starts |
string | ISO 8601 date when the next masechta begins (YYYY-MM-DD) |
date |
string | The date queried |
GET /
Response: 200 OK
{
"current_daf": {
"masechta": "Berachos",
"key": "berachos",
"daf": 15
},
"cycle": {
"number": 14,
"label": "14th cycle"
},
"next_masechta": {
"name": "Shabbos",
"key": "shabbos",
"starts": "2025-02-10"
},
"date": "2024-06-15"
}
The Daf Yomi follows this order through the Babylonian Talmud:
// Fetch current Daf Yomi
async function getCurrentDaf() {
const response = await fetch('https://www.shas.org/daf-yomi-api/');
const data = await response.json();
console.log(`Today's Daf: ${data.current_daf.masechta} ${data.current_daf.daf}`);
console.log(`Cycle: ${data.cycle.label}`);
console.log(`Next: ${data.next_masechta.name} starts ${data.next_masechta.starts}`);
return data;
}
// Fetch Daf Yomi for a specific date
async function getDafForDate(dateString) {
const response = await fetch(`https://www.shas.org/daf-yomi-api/?date=${dateString}`);
const data = await response.json();
console.log(`Daf on ${data.date}: ${data.current_daf.masechta} ${data.current_daf.daf}`);
return data;
}
getCurrentDaf();
getDafForDate('2023-09-15');
// Display Daf Yomi on your webpage
$.getJSON('https://www.shas.org/daf-yomi-api/', function(data) {
$('#daf-display').html(
data.current_daf.masechta + ' ' + data.current_daf.daf
);
$('#cycle-info').text(data.cycle.label);
});
// Get daf for a specific date
$.getJSON('https://www.shas.org/daf-yomi-api/?date=2023-09-15', function(data) {
console.log('Daf on ' + data.date + ': ' + data.current_daf.masechta + ' ' + data.current_daf.daf);
});
// Fetch Daf Yomi in PHP
$ch = curl_init('https://www.shas.org/daf-yomi-api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Today's Daf: " . $data['current_daf']['masechta'] . " " . $data['current_daf']['daf'];
// Get daf for specific date
$date = '2023-09-15';
$ch = curl_init("https://www.shas.org/daf-yomi-api/?date=$date");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Daf on $date: " . $data['current_daf']['masechta'] . " " . $data['current_daf']['daf'];
import requests
from datetime import datetime, timedelta
# Get current Daf Yomi
response = requests.get('https://www.shas.org/daf-yomi-api/')
data = response.json()
print(f"Today's Daf: {data['current_daf']['masechta']} {data['current_daf']['daf']}")
print(f"Cycle: {data['cycle']['label']}")
print(f"Next: {data['next_masechta']['name']} starts {data['next_masechta']['starts']}")
# Get daf for a specific date
date = '2023-09-15'
response = requests.get(f'https://www.shas.org/daf-yomi-api/?date={date}')
data = response.json()
print(f"Daf on {data['date']}: {data['current_daf']['masechta']} {data['current_daf']['daf']}")
# Get daf for yesterday
yesterday = (datetime.now() - timedelta(days=1)).strftime('%Y-%m-%d')
response = requests.get(f'https://www.shas.org/daf-yomi-api/?date={yesterday}')
data = response.json()
print(f"Yesterday's Daf: {data['current_daf']['masechta']} {data['current_daf']['daf']}")
You can combine this API with the Daf PDF API to create a complete Daf Yomi viewer:
async function displayTodaysDaf() {
// Get current daf info
const infoResponse = await fetch('daf-yomi-api/');
const info = await infoResponse.json();
// Convert masechta name to lowercase with hyphens for PDF API
const masechta = info.current_daf.masechta
.toLowerCase()
.replace(/\s+/g, '-')
.replace(/'/g, '');
// Build PDF URL
const pdfUrl = `api/?masechta=${masechta}&daf=${info.current_daf.daf}&amud=a`;
// Display info
document.getElementById('daf-title').textContent =
`${info.current_daf.masechta} ${info.current_daf.daf}`;
// Load PDF
document.getElementById('pdf-viewer').src = pdfUrl;
// Show next masechta
document.getElementById('next-info').textContent =
`Next: ${info.next_masechta.name} (${info.next_masechta.starts})`;
}
displayTodaysDaf();
Status Code: 400 Bad Request
{
"error": "Invalid date format",
"message": "Date must be in YYYY-MM-DD format (e.g., 2025-01-15)"
}
Status Code: 400 Bad Request
{
"error": "Invalid date",
"message": "The date 2025-02-30 is not a valid calendar date"
}
date parameter, provide dates in YYYY-MM-DD
format (ISO 8601). The calculation is timezone-agnostic for specific dates.