### Sample response (radius search) Source: https://vancam.ai/docs Example JSON response for a radius search, showing camera details including asset_id, location, direction, and distance. ```json { "type": "radius_search", "count": 1, "radius_km": 1.0, "cameras": [ { "asset_id": 30145, "level0": "North America", "level1": "CA", "level2": "British Columbia", "level3": "Vancouver", "longitude": -123.120444, "latitude": 49.279674, "direction": "North", "street_address": "Seymour St and Smithe St", "camera_class": "open", "distance_meters": 48.56 } ] } ``` -------------------------------- ### GET /api?asset_id={id} Source: https://vancam.ai/docs The GET /api endpoint retrieves the latest live frame for a specified camera, returning a binary JPEG image. ```APIDOC ## GET /api?asset_id={id} ### Description Fetches the latest live frame for a camera as a binary JPEG image. ### Method GET ### Endpoint /api?asset_id={id} ### Parameters #### Query Parameters - **asset_id** (number) - Required - Unique camera identifier. ### Request Example GET https://api.vancam.ai/api?asset_id=30145 ### Response #### Success Response (200) Binary JPEG image data. ``` -------------------------------- ### Camera by ID Source: https://vancam.ai/docs Get full details for a single camera by asset_id. ```http GET /cameras/cameras?asset_id=30145 ``` -------------------------------- ### GET /cameras/cameras Source: https://vancam.ai/docs The GET /cameras/cameras endpoint provides spatial search for cameras with multiple modes: radius, route, bounds, nearest, and by ID. It requires an x-api-key header for authentication. ```APIDOC ## GET /cameras/cameras ### Description Searches for cameras using one of four modes (radius, route, bounds, nearest) or fetches a single camera by ID, depending on the query parameters passed. ### Method GET ### Endpoint /cameras/cameras ### Parameters #### Query Parameters - **lat** (number) - Required for radius and nearest searches - Latitude of the center point. - **lon** (number) - Required for radius and nearest searches - Longitude of the center point. - **radius** (number) - Required for radius search - Search radius in kilometers (0 to 50). - **limit** (number) - Optional - Maximum number of results (default 50 for radius/route, 100 for bounds, 5 for nearest; nearest limit must be 1-50). - **origin_lat** (number) - Required for route search - Latitude of the origin point. - **origin_lon** (number) - Required for route search - Longitude of the origin point. - **dest_lat** (number) - Required for route search - Latitude of the destination point. - **dest_lon** (number) - Required for route search - Longitude of the destination point. - **buffer** (number) - Required for route search - Buffer distance in meters around the straight line. - **min_lat** (number) - Required for bounds search - Minimum latitude of the bounding box. - **min_lon** (number) - Required for bounds search - Minimum longitude of the bounding box. - **max_lat** (number) - Required for bounds search - Maximum latitude of the bounding box. - **max_lon** (number) - Required for bounds search - Maximum longitude of the bounding box. - **nearest** (boolean) - Required for nearest search - Set to true to use nearest search mode. - **asset_id** (number) - Required for camera by ID - Unique camera identifier. ### Request Example GET /cameras/cameras?lat=49.2827&lon=-123.1207&radius=1 ### Response #### Success Response (200) - **type** (string) - Search mode used (e.g., "radius_search"). - **count** (number) - Number of cameras returned. - **radius_km** (number) - Search radius in kilometers (radius search only). - **cameras** (array) - List of camera objects. - **asset_id** (number) - Unique camera identifier. - **level0** (string) - Continent. - **level1** (string) - Country. - **level2** (string) - Province/State. - **level3** (string) - City. - **longitude** (number) - Longitude (WGS84). - **latitude** (number) - Latitude (WGS84). - **direction** (string) - Cardinal camera facing. - **street_address** (string) - Street address. - **camera_class** (string) - "open" or "private". - **distance_meters** (number) - Distance from search point (radius/nearest searches). #### Response Example { "type": "radius_search", "count": 1, "radius_km": 1.0, "cameras": [ { "asset_id": 30145, "level0": "North America", "level1": "CA", "level2": "British Columbia", "level3": "Vancouver", "longitude": -123.120444, "latitude": 49.279674, "direction": "North", "street_address": "Seymour St and Smithe St", "camera_class": "open", "distance_meters": 48.56 } ] } ``` -------------------------------- ### Authentication with x-api-key header Source: https://vancam.ai/docs Every request requires an x-api-key header. If VANCAM_API_KEY or x-api-key is not set, the client defaults to a shared public key. Requests without a valid key are rejected with 403. ```bash curl "https://api.vancam.ai/cameras/cameras?lat=49.2827&lon=-123.1207&radius=1" \ -H "x-api-key: " ``` -------------------------------- ### Fetch live frame by asset_id Source: https://vancam.ai/docs Fetch the latest live frame for a camera (binary JPEG). ```http GET https://api.vancam.ai/api?asset_id=30145 ``` -------------------------------- ### Bounds search Source: https://vancam.ai/docs Find cameras inside a bounding box. Optional limit (default 100). ```http GET /cameras/cameras?min_lat=49.2&min_lon=-123.2&max_lat=49.3&max_lon=-123.0 ``` -------------------------------- ### Base URL Source: https://vancam.ai/docs The base URL for all API requests. ```text https://api.vancam.ai/cameras/cameras ``` -------------------------------- ### Route search Source: https://vancam.ai/docs Find cameras within a buffer (meters) of a straight line between origin and destination. Optional limit (default 50). ```http GET /cameras/cameras?origin_lat=49.2827&origin_lon=-123.1207&dest_lat=49.2965&dest_lon=-123.0884&buffer=100 ``` -------------------------------- ### Radius search Source: https://vancam.ai/docs Find cameras within a radius (km) of a point. Optional limit (default 50). Radius must be between 0 and 50 km. ```http GET /cameras/cameras?lat=49.2827&lon=-123.1207&radius=1 ``` -------------------------------- ### Nearest search Source: https://vancam.ai/docs Find N nearest cameras to a point. limit must be between 1 and 50 (default 5). ```http GET /cameras/cameras?lat=49.2827&lon=-123.1207&nearest=true&limit=5 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.