berryline api
read-only access to the same estimate, chart, and report data the website itself uses. free for personal/educational use — sign in with your harvard email to get a key. all endpoints below are versioned (v1), so they won't change shape under you.
authentication
every request below needs an Authorization header with your API key as a DRF token. get one on the account page — it's free, just sign in with a harvard.edu email.
Authorization: Token <your-api-key>
rate limit: 1000 requests/day per key. requests without a valid token get a 401.
/api/v1/statuscurrent estimate
the live, recency-weighted estimate of how many people are in line right now.
request
curl -H "Authorization: Token <key>" \ https://api.howlongistheberryline.com/api/v1/status
response
{
"has_estimate": true,
"message": null,
"estimate_display": "15-20",
"estimate_value": 17.3,
"report_count": 4,
"last_updated": "2026-08-29T14:32:10-04:00",
"hours": {
"is_open": true,
"closing_soon": false,
"minutes_until_close": 145,
"closes_at": "10:50pm",
"opens_at": null
}
}/api/v1/chartchart data
scatter of individual reports plus a smoothed line series over a date range. omit both params for today.
query params
since— YYYY-MM-DD, inclusive, local time. optional.until— YYYY-MM-DD, inclusive, local time. optional.
request
curl -H "Authorization: Token <key>" \ "https://api.howlongistheberryline.com/api/v1/chart?since=2026-08-01&until=2026-08-28"
response
{
"scatter": [
{ "t": "2026-08-28T14:05:00-04:00", "value": 15 }
],
"line": [
{ "t": "2026-08-28T00:00:00-04:00", "value": null },
{ "t": "2026-08-28T00:15:00-04:00", "value": 12.4 }
]
}/api/v1/patternstypical patterns
plain average headcount by hour-of-day and by day-of-week, over an optional range. defaults to all-time. useful for 'when's it usually short' questions rather than a live number.
query params
since— YYYY-MM-DD, inclusive, local time. optional.until— YYYY-MM-DD, inclusive, local time. optional.
request
curl -H "Authorization: Token <key>" \ https://api.howlongistheberryline.com/api/v1/patterns
response
{
"by_hour": [
{ "hour": 0, "value": null, "report_count": 0 },
{ "hour": 14, "value": 18.2, "report_count": 41 }
],
"by_weekday": [
{ "weekday": 0, "label": "Mon", "value": 14.1, "report_count": 88 }
]
}/api/v1/reportsrecent reports feed
raw, individual reports, newest first, cursor-paginated. no lat/lng — those never leave the server.
query params
limit— page size, default 8, max 200.cursor— opaque pagination cursor from a previous response's next field.
request
curl -H "Authorization: Token <key>" \ "https://api.howlongistheberryline.com/api/v1/reports?limit=50"
response
{
"next": "https://api.howlongistheberryline.com/api/v1/reports?cursor=abc123",
"previous": null,
"results": [
{ "id": 512, "bucket": "11-20", "created_at": "2026-08-29T14:32:10-04:00", "photo_url": null }
]
}/api/v1/export.csvcsv export
every report in the range as a csv download — timestamp, bucket, whether a photo was attached. same privacy rule as the feed: no lat/lng.
query params
since— YYYY-MM-DD, inclusive, local time. optional.until— YYYY-MM-DD, inclusive, local time. optional.
request
curl -H "Authorization: Token <key>" \ "https://api.howlongistheberryline.com/api/v1/export.csv?since=2026-08-01" -o reports.csv
response
timestamp,bucket,has_photo 2026-08-01T09:14:02-04:00,6-10,False 2026-08-01T09:41:55-04:00,11-20,False
buckets
reports are collected as one of six headcount buckets: 0, 1-5, 6-10, 11-20, 20-30, 30+. chart/patterns/status endpoints blend these into a smoothed numeric estimate — that's a separate, continuous number, not one of the six buckets.
questions or need a higher rate limit? igzcodes@gmail.com