For developers
Traffic observations API
Read stored observations through GET /api/v1/traffic. This is an experimental feed, not a guarantee of current road conditions.
Make a request
curl --fail https://sanjuanpuertorico.org/api/v1/trafficResponse fields
A successful response is a JSON array of records. An empty array means no records are available.
| Field | Meaning |
|---|---|
| id | Record identifier |
| severity | Stored severity value; not an audited congestion scale |
| description | Source observation text |
| latitude / longitude | Stored coordinates |
| source | Source reference |
| updated | Stored update value; inspect before treating the record as current |
Handle gaps explicitly
Check the HTTP status, allow for an unavailable feed, and inspect the update values before displaying an observation. Do not turn an old image or stored severity value into a claim about current driving conditions.