API Documentation
TrashAlert provides a free, public API for looking up trash pickup schedules in San Diego. No API key required. Please be respectful with rate limits.
Base URL:
Rate Limit: 60 requests per minute per IP. Calendar and share-card endpoints are cached.
https://trashalert.ioRate Limit: 60 requests per minute per IP. Calendar and share-card endpoints are cached.
GET
/api/scheduleLook up trash pickup schedule by address or ZIP code
Parameters
address(string)* — Street address (e.g., "4567 Park Blvd")city(string) — City name (default: "san diego")zip(string) — ZIP code (alternative to address lookup)Response
{
"found": true,
"match": "exact" | "fuzzy",
"matchedAddress": "4567 park blvd, san diego, ca 92103",
"schedule": {
"collection_day": "wednesday",
"recycling_week": "A",
"verified": true,
"verification_count": 3,
"neighborhood": "university-heights"
}
}GET
/api/suggestAddress autocomplete — returns matching addresses from the database
Parameters
q(string)* — Search query (minimum 2 characters)Response
{
"suggestions": [
{
"address": "4567 park blvd, san diego, ca 92103",
"neighborhood": "university-heights",
"collection_day": "wednesday",
"recycling_week": "A",
"verified": true
}
]
}POST
/api/reportSubmit a schedule report for an address
Parameters
address(string)* — Street addresszip_code(string)* — 5-digit ZIP codecollection_day(string)* — Weekday (monday–friday)recycling_week(string) — "A" or "B"display_name(string) — Leaderboard display nameResponse
{ "success": true, "id": "uuid", "isVerification": false }GET
/api/calendarDownload .ics calendar file for a pickup schedule
Parameters
day(string)* — Collection day (monday–friday)recycling_week(string) — "A" or "B"address(string) — Address for calendar event titlesResponse
Returns .ics file (text/calendar)GET
/api/recentGet recently confirmed schedule reports
Response
{
"recent": [
{
"neighborhood": "North Park",
"collection_day": "wednesday",
"verified": true,
"source": "community",
"time_ago": "2h ago"
}
]
}GET
/api/healthHealth check — verifies app and database connectivity
Response
{
"status": "ok",
"supabase": "connected",
"latency_ms": 42,
"data": {
"schedule_reports": 119,
"neighborhoods_with_data": 18
},
"timestamp": "2026-02-21T00:00:00.000Z",
"version": "1.0.0"
}GET
/api/share-cardGenerate a shareable schedule card image (PNG)
Parameters
day(string)* — Collection day (monday–friday)neighborhood(string) — Neighborhood slugweek(string) — Recycling week (A or B)Response
Returns 1200x630 PNG imageGET
/api/leaderboardGet top contributors by report count
Response
{
"leaderboard": [
{ "display_name": "TrashHero", "report_count": 15, "rank": 1 }
]
}Usage Examples
Look up by address (curl)
curl "https://trashalert.io/api/schedule?address=4567+Park+Blvd"Look up by ZIP code
curl "https://trashalert.io/api/schedule?zip=92104"Generate share card
curl -o card.png "https://trashalert.io/api/share-card?day=wednesday&neighborhood=north-park&week=A"