← backapi

howlongistheberryline.com api

read-only access to the same estimate, chart, and report data the website itself uses. free for personal/educational use, but please don't abuse it.

your api key

loading...

authentication

every request below needs an Authorization header with your API key as a DRF token. get one above by signing 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.

GET/api/v1/status

current 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
  }
}
GET/api/v1/chart

chart data

scatter of individual reports plus a smoothed line series over a date range. omit both params for today. over long ranges (stepped a day or more at a time), each line point is that day's or week's average instead. for a single day, open_window spans the week's earliest opening to its latest close, and lists the parts of it that day is closed; it's null for longer ranges.

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-28T12:00:00-04:00", "value": null },
    { "t": "2026-08-28T12:15:00-04:00", "value": 12.4 }
  ],
  "open_window": {
    "start": "2026-08-28T12:00:00-04:00",
    "end": "2026-08-28T22:50:00-04:00",
    "closed": [
      { "start": "2026-08-28T12:00:00-04:00", "end": "2026-08-28T13:00:00-04:00" }
    ]
  }
}
GET/api/v1/patterns

typical 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 }
  ],
  "open_hours": { "first": 12, "last": 22 }
}
GET/api/v1/highlights

daily highlights

the daily highlight: an older photo from the feed, brought back for the day. newest first. days without a highlight are left out.

query params

  • days : how many days back to look, today included. default 7, max 60.

request

curl -H "Authorization: Token <key>" \
  "https://api.howlongistheberryline.com/api/v1/highlights?days=1"

response

{
  "highlights": [
    {
      "date": "2026-10-02",
      "photo": {
        "id": 42,
        "image_url": "https://photos.howlongistheberryline.com/photos/2026/09/a1b2.jpg",
        "thumbnail_url": "https://photos.howlongistheberryline.com/photos/2026/09/c3d4.jpg",
        "caption": "worth the wait",
        "created_at": "2026-09-14T19:02:11-04:00",
        "expires_at": "2026-09-17T19:02:11-04:00",
        "like_count": 12,
        "liked": false
      }
    }
  ]
}
GET/api/v1/reports

recent 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": "20", "created_at": "2026-08-29T14:32:10-04:00" }
  ]
}
GET/api/v1/export.csv

csv export

every report in the range as a csv download: timestamp and bucket. 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
2026-08-01T09:14:02-04:00,10
2026-08-01T09:41:55-04:00,20

questions or need a higher rate limit? igzcodes@gmail.com