Developers · Data layer
Build with codriver. Open by default.
Read · No account needed
GET /v2/entities/nearby
Query a point and radius to receive community alerts, chargers, cameras and eligible feed entities as JSON. No API key or session is needed. The route permits 60 requests per minute for guests and 120 for signed-in accounts.
curl 'https://app.codriver.io/v2/entities/nearby?lat=45.4699&lng=-73.5461&radius=3000'
# Example response:
# {
# "entities": [
# { "id": "...", "kind_id": "alert.police",
# "geom": { "type": "Point", "coordinates": [-73.54, 45.46] }, ... },
# { "id": "...", "kind_id": "charger.supercharger", ... }
# ],
# "sources": [ { "id": "chargers", "status": "online", ... } ]
# }Use sources[] to narrow the response to one source; discover available IDs at /v2/sources. Cross-origin browser requests are not enabled, so call this endpoint from a server or script. Full parameter reference: developer.codriver.io (English).
Write · Your feeds, your layer
POST /v2/feeds
Register a feed once, then push entities when you have updates or let codriver pull an HTTPS URL you control. A feed maps to a layer you own. Registration requires a codriver session; a push token is returned only at creation or rotation.
Push feed
# 1. Register a feed after signing in at codriver.io:
curl -X POST 'https://app.codriver.io/v2/feeds' \
-H 'Content-Type: application/json' \
--cookie /tmp/cookies.txt \
-d '{ "name": "My Traffic Feed", "direction": "push", "visibility": "private" }'
# → { "feed": { ... }, "push_ingest_token": "cdrf_..." }
# Store this token now; it is shown once.
# 2. Push entities whenever you have updates:
TOKEN="cdrf_..."
curl -X POST "https://app.codriver.io/v2/feeds/$TOKEN/entities" \
-H 'Content-Type: application/json' \
-d '[
{ "external_id": "incident-2026-05-22-001",
"kind": "alert.road_closed",
"lat": 45.5017, "lng": -73.5673,
"properties": { "street": "René-Lévesque", "reason": "downed line" },
"ttl_seconds": 3600 }
]'
# → { "accepted": 1, "rejected": 0, "errors": [] }Pull feed
curl -X POST 'https://app.codriver.io/v2/feeds' \
-H 'Content-Type: application/json' \
--cookie /tmp/cookies.txt \
-d '{
"name": "MyCity 311 Feed",
"direction": "pull",
"pull_url": "https://api.mycity.example/311.json",
"pull_auth_header": "X-API-Key: your-key-here",
"pull_interval_seconds": 300
}'The accepted pull interval is 30–3600 seconds; values outside that range are rejected. After 20 consecutive failures, the feed is disabled. Backoff doubles after each failure, up to one hour. Re-enable it with PATCH after fixing the cause. The URL must use HTTPS and a public hostname.
Kinds · Catalog
19 kinds in the committed catalog.
Each submitted kind must be in the catalog. The current seed includes:
- Alerts:
alert.police,alert.accident,alert.road_closed,alert.construction,alert.hazard,alert.hazard.car_stopped,alert.hazard.object_on_road,alert.hazard.pothole,alert.hazard.animal,alert.hazard.fog,alert.hazard.ice,alert.hazard.flooding - Cameras:
camera.speed,camera.red_light,camera.avg_speed,camera.alpr - Chargers:
charger.supercharger,charger.destination - Traffic:
traffic.jam
A row with an unknown kind is rejected at ingestion; other valid rows in the batch can still be accepted. The external reference currently lists 18 and omits camera.alpr; the committed seed adds that nineteenth kind. For a new kind, contact support@codriver.io.
Stability · v1 contract
The published contract.
- The published v1 contract promises a 90-day email deprecation window before breaking changes to external_id, kind, lat, lng, properties, ttl_seconds or observed_at.
- Additive fields and new kinds are treated as non-breaking changes.
- Existing kind IDs are not renamed under that published contract.
- Entity and feed records are hosted in Helsinki. The optional Car route telemetry path has a Montreal first hop; see Privacy for that exception. Privacy →
Full spec and contact
Go deeper.
The canonical reference is at developer.codriver.io (English). It covers kinds, error codes, integration patterns and the stability policy in more detail. The engineering pointer in the driving-app repo is docs/EXTERNAL-FEEDS.md.
For feed-spec questions, layer review or bugs, email support@codriver.io.
FAQ