Reference
Pagination & filtering
Every list endpoint speaks the same dialect. These conventions apply to the v1.1 surfaces (browse, feeds, itemized dockets); the original v1 endpoints keep their simpler limit-only shape for compatibility.
Cursor pagination
limit (default 20, max 100) sizes the page; cursor — opaque, from the previous response's meta.nextCursor — continues it. nextCursor is null on the last page. Filtered browse pages can return fewer than limit rows mid-stream (derived filters thin candidates after fetch); keep following the cursor.
{
"data": [ … ],
"meta": { "nextCursor": "bzo0MA", "returned": 20 }
}Cursor-paginated endpoints:
- GET /v1/restaurants
- GET /v1/violations
- GET /v1/inspections
- GET /v1/properties/{bbl}/violations
- GET /v1/properties/{bbl}/permits
- GET /v1/contractors
- GET /v1/contractors/{slug}/tickets
- POST /v1/contractors/batch
- GET /v1/restaurants/{camis}/reports
- GET /v1/profile/reports
let cursor = null;
const rows = [];
do {
const url = new URL("https://www.dailydog.ai/api/v1/violations");
url.searchParams.set("category", "vermin");
url.searchParams.set("borough", "Brooklyn");
url.searchParams.set("limit", "100");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: `Bearer ${KEY}` } });
const { data, meta } = await res.json();
rows.push(...data);
cursor = meta.nextCursor;
} while (cursor);Batch endpoints
/v1/restaurants/batch, /v1/properties/batch, /v1/contractors/batch take a JSON body of ids and return one profile per hit, in data. Ids that resolve to nothing (or whose upstream lookup failed) land in meta.notFound — never a 4xx for the whole call.
{
"data": [ … ],
"meta": { "notFound": ["00000000"] }
}Filters
- Multi-value: comma lists —
grade=A,B,borough=Manhattan,Brooklyn,status=open,defaulted. - Dates:
since=/until=inYYYY-MM-DD.since=is the monitoring contract — poll with your last check's date to see only what's new. Full ISO timestamps are accepted too. - Booleans: the literal strings
true/false. - Sorting:
sort=field, descending with a-prefix (sort=-finesDueCents). Each endpoint documents its sortable fields. - Unknown parameters are rejectedwith a 400 naming the offender — a typo'd filter silently ignored would be a wrong answer served confidently. (Exception: the community-report list ignores extra parameters.)
Money & dates
Money is always integer cents (finesDueCents: 6650000 = $66,500). Dates are ISO-8601 strings; day-precision fields are YYYY-MM-DD.