Skip to content

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: https://trashalert.io
Rate Limit: 60 requests per minute per IP. Calendar and share-card endpoints are cached.
GET/api/schedule

Look 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/suggest

Address 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/report

Submit a schedule report for an address

Parameters

address(string)*Street address
zip_code(string)*5-digit ZIP code
collection_day(string)*Weekday (monday–friday)
recycling_week(string)"A" or "B"
display_name(string)Leaderboard display name

Response

{ "success": true, "id": "uuid", "isVerification": false }
GET/api/calendar

Download .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 titles

Response

Returns .ics file (text/calendar)
GET/api/recent

Get recently confirmed schedule reports

Response

{
  "recent": [
    {
      "neighborhood": "North Park",
      "collection_day": "wednesday",
      "verified": true,
      "source": "community",
      "time_ago": "2h ago"
    }
  ]
}
GET/api/health

Health 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-card

Generate a shareable schedule card image (PNG)

Parameters

day(string)*Collection day (monday–friday)
neighborhood(string)Neighborhood slug
week(string)Recycling week (A or B)

Response

Returns 1200x630 PNG image
GET/api/leaderboard

Get 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"