Hebcal.com offers a REST API for fetching Jewish calendar data. The output format is in JSON.
The basic URL format is as follows:
http://www.hebcal.com/hebcal/?v=1;cfg=json;nh=on;nx=on;year=now;month=x;ss=on;mf=on;c=on;zip=90210;m=72;s=on
Note the following customizable parameters and their meanings:
- year=now – “now” for current year, or 4-digit YYYY such as 2003
- month=x – “x” for entire Gregorian year, or use a numeric month (1=January, 6=June, etc.)
- nh=on – Major holidays
- nx=on – Rosh Chodesh
- mf=on – Minor fasts
- ss=on – Special Shabbatot
- s=on – Parashat ha-Shavuah on Saturday
- i=off – Diaspora sedra scheme
- i=on – Israel sedra scheme
- c=on – Candle lighting times
- zip=90210 – use zip code 90210 for candle lighting times
- m=72 – Havdalah 72 minutes after sundown. Set to m=0 (zero) to disable Havdalah times
- D=on – Hebrew date for dates with some event
- d=on – Hebrew date for entire date range
- o=on – Days of the Omer
Note mutually exclusive language parameter:
- lg=s – Sephardic transliterations
- lg=sh – Sephardic translit. + Hebrew
- lg=a – Ashkenazis transliterations
- lg=ah – Ashkenazis translit. + Hebrew
- lg=h – Hebrew only
And example output looks like this:
{
"title":"Hebcal 2011 Beverly Hills, CA 90210",
"link":"http:\/\/www.hebcal.com\/hebcal\/?v=1;nh=on;nx=on;year=2011;month=x;ss=on;mf=on;c=on;zip=90210;m=72;s=on;geo=zip;tz=-8;dst=usa",
"date":"2011-06-16T19:32:11-00:00",
"latitude":34.0925,
"longitude":-118.4099,
"items":[
{
"title":"Candle lighting: 4:42pm",
"category":"candles",
"date":"2011-01-07T16:42:00-08:00"
},
{
"title":"Parashat Bo",
"category":"parashat",
"date":"2011-01-08",
"link":"http:\/\/www.hebcal.com\/sedrot\/bo",
"hebrew":"פרשת בא"
},
{
"title":"Havdalah (72 min): 6:13pm",
"category":"havdalah",
"date":"2011-01-08T18:13:00-08:00"
},
{
"title":"Tu B'Shvat",
"category":"holiday",
"date":"2011-01-20",
"link":"http:\/\/www.hebcal.com\/holidays\/tu-bshvat",
"hebrew":"טו בשבט"
}
]
}
If you don’t want candle lighting times, just use c=off and omit the zip and m parameters.