Guides
Guides

How to get a list of safety cameras inside a bounding box

This section provides an example of a request for a list of all static and live safety cameras within a rectangular area in London.

📘

Note

Each request requires authentication with a valid bearer token in the HTTP authorization header. For more information about obtaining credentials, see the Identity and Access Management - Developer Guide.

Sample request

The following code block provides the complete request:

GET /v2/search?in=bbox:-0.2558623,51.5588371,-0.2421394,51.6180131 HTTP/1.1
Host: safetycameras.cit.cc.api.here.com
Authorization: Bearer eyJhbGceOyJSAMPLEiIsImN0eSISAMPLEt7VTFIllwIM0cKNCjN2WCCTqlwEEmk-t3gx1BpqUFoeBSAMPLEvhj8nl-RBGcyoljY...
Cache-Control: no-cache
Accept: application/json

Sample response

The HTTP status code is 200 and the response contains a list of static and live safety cameras, where each camera has its own unique id, location, and type, alongside other properties as defined in Response data types.

{
    "safetyCameras": [
        {
            "id": "23642_3_GBR",
            "country": "GBR",
            "positions": [
                {
                    "latitude": 51.568904876709,
                    "longitude": -0.240258768200874,
                    "drivingDirection": 241
                },
                {
                    "latitude": 51.5466804504395,
                    "longitude": -0.267343759536743,
                    "drivingDirection": 235
                }
            ],
            "cameraType": "Average",
            "speedLimit": {
                "value": 40,
                "unit": "MPH"
            },
            "directionType": "Same",
            "openLR": [
                "CINGARAAg0GDO//USCSr3AAJBQQBA..."
            ]
        },
        {
            "id": "AAAAAACOClc_GBR",
            "country": "GBR",
            "positions": [
                {
                    "latitude": 51.61791,
                    "longitude": -0.2534,
                    "drivingDirection": 148
                }
            ],
            "cameraType": "Mobile",
            "directionType": "Both",
            "length": {
                "value": 600,
                "unit": "Meter"
            },
            "openLR": [
                "CC8BEAIrJv/QNiS2xQA...",
                "CC8BEAIrJv/UBySyigA..."
            ],
            "timestamp": "2021-01-19T06:04:42.07Z"
        }
    ]
}