Get latest data for all public cameras
GET/api/getCameraDataByLoc
- Data Format: the camera data is delivered in a compressed format to optimize object size. The data is comprised of two objects, "cams" & "locs", each of which contains attributes "data" & "key". "data" is an array of objects, each corresponding to one camera or location. "key" correlates the abbreviated attributes for these two data types to human-readable values. Cameras are linked to locations via the "lid" (location id) attribute, found on each camera object.
- Constructing Image Keys: Image keys are constructed using the following information, which can be derived from the "cid" (camera id), and "img" keys. The year/month/day information can be derived from the epoch timestamp embedded in the image filename: https://img.cdn.prod.alertwest.com/data/img/[cid]/[yyyy]/[mm]/[dd]/[img]
- For example, an image for Camera ID #12224 titled Ridge_Tahoe_NV_1743530801_6917.jpg would be found at https://img.cdn.prod.alertwest.com/data/img/12224/2025/04/01/Ridge_Tahoe_NV_1743530801_6917.jpg
Request
Responses
- 200
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
The status code (1 for success, 0 for failure)
The status message
data
object
The camera data
locs
object
data
object[]
The location ID
The latitude of the location
The longitude of the location
The state code of the location
Private location true/false
A map of location attributes to human-readable keys
cams
object
data
object[]
Auto Target Override (whether the most recent move should display a target on the map)
The pan value of the camera in degrees
The tilt value of the camera in degrees
The zoom value of the camera
Whether auto focus is enabled
The focus value of the camera
The brightness value of the camera
Whether the camera is PTZ
The camera ID
Whether the camera is private
The last move time of the camera
The location ID of the camera
The camera name
The hostname of the camera
The image URL of the camera
Whether the camera is offline
The average execution time of recent requests to the camera
The ISP of the camera
The type of camera
The camera class / manufacturer of the camera
The field of view of the camera
The sponsor of the camera
The county of the camera
The state of the camera (deprecated - use location)
The provider of the camera
URL of the provider's website
URL of the provider's bar logo
URL of the provider's square logo
Whether the camera has a guard tour configured
Whether the camera is currently in touring mode
The name of the camera tour
A map of camera attributes to human-readable keys
The error message
Unused/Deprecated
{
"code": 1,
"str": "",
"data": {
"locs": {
"data": [
{
"id": 124,
"lat": "39.829201",
"lon": "-121.471603",
"st": "CA",
"lp": 0
}
],
"key": {
"id": "locId",
"lat": "locLat",
"lon": "locLon",
"st": "locState",
"lp": "locPrivate"
}
},
"cams": {
"data": [
{
"ato": 1,
"p": "78.54",
"t": "-2.43",
"z": "1",
"af": 1,
"foc": "7749",
"br": "5000",
"ptz": 1,
"id": "1006",
"pv": 0,
"lmt": "1740211213",
"lid": 124,
"cn": "Flea_Mtn_1",
"hn": "Axis-FleaMtn",
"img": "Flea_Mtn_1_1740432520_7532.jpg",
"off": 0,
"cl": 28,
"isp": "Digitalpath",
"typ": "6",
"cc": "axis",
"fov": "65.33",
"sp": "PG&E",
"co": "Butte",
"st": "",
"pr": "UCSD",
"pl": "https://alertcalifornia.org/",
"pi": "/img/alertcalifornia-ucsd-logo.png",
"ps": "/img/alertcalifornia-ucsd-logo-actually-square.png",
"tb": 1,
"trg": 0,
"tr": "root.GuardTour.G0"
}
],
"key": {
"ato": "camAutoTargetOverride",
"p": "camAzimuth",
"t": "camElevation",
"z": "camZoom",
"af": "camAutoFocus",
"foc": "camFocus",
"br": "camBrightness",
"ptz": "camHasPTZ",
"id": "camId",
"pv": "camPrivate",
"lmt": "camLastMoved",
"lid": "camLocation",
"cn": "camName",
"hn": "camHostname",
"img": "camScreenshot",
"off": "camOffline",
"cl": "camLatency",
"isp": "camIsp",
"typ": "camType",
"cc": "camClass",
"fov": "camViewWidth",
"sp": "camSponsor",
"co": "camCounty",
"st": "camState",
"pr": "camProviderName",
"pl": "camProviderLink",
"pi": "camProviderLogo",
"ps": "camProviderLogoSquare",
"tb": "camTourable",
"trg": "camTouring",
"tr": "camTour"
}
}
},
"err": "",
"rendered": ""
}