Endpoint Examples

Retrieve Metadata for a Given Point

In this example we retrieve surveys for a given LONG,LAT point, limiting the response to two surveys for a location in Australia.

NOTE: For a location other than in Australia, for example in the US, substitute the LONG LAT values. E.g. Request for Texas State Capitol Building:

Request - https://api.nearmap.com/coverage/v2/point/138.59707796614592,-34.91729448760797?apikey=Yzc2MjEzMWUtY2Q4YS00NTM2LTgyMDgtMDljZjI2YTdhMTMz&limit=2

Response

{
    "surveys": [
        {
            "captureDate": "2018-10-29",
            "firstPhotoTime": "2018-10-29T00:33:23Z",
            "id": "100-353f704a-dcaa-11e8-b148-c715c343620e",
            "lastPhotoTime": "2018-10-29T04:45:23Z",
            "location": {
                "country": "AU",
                "region": "Adelaide",
                "state": "SA"
            },
            "onlineTime": "2018-10-31T01:13:43Z",
            "pixelSize": 0.069,
            "resources": {
                "tiles": [
                    {
                        "id": "3540420e-dcaa-11e8-b14b-5b94392a0156",
                        "scale": 21,
                        "type": "Vert"
                    },
                ]
            },
            "timezone": "ACDT",
            "utcOffset": 37800
        },
        {
            "captureDate": "2018-08-22",
            "firstPhotoTime": "2018-08-22T00:17:33Z",
            "id": "100-4c51ffe8-ab52-11e8-9b7a-b3f8ca0bcb81",
            "lastPhotoTime": "2018-08-22T02:51:17Z",
            "location": {
                "country": "AU",
                "region": "Adelaide",
                "state": "SA"
            },
            "onlineTime": "2018-08-29T06:10:59Z",
            "pixelSize": 0.069,
            "resources": {
                "tiles": [
                    {
                        "id": "4c55ec3e-ab52-11e8-9b7d-437267690635",
                        "scale": 21,
                        "type": "Vert"
                    }
                ]
            },
            "timezone": "ACST",
            "utcOffset": 34200
        }
    ],
    "limit": 2,
    "offset": 0,
    "total": 66
}

Retrieve Metadata for a Given Tile Coordinate

In this example we retrieve surveys for a given tile  x/y/z coordinate ,  limiting the response to two surveys for a location in Australia.

NOTE: For a location other than in Australia, for example in the US, substitute the x/y/z coordinates.

Request - https://api.nearmap.com/coverage/v2/coord/16/57999/39561?apikey=Yzc2MjEzMWUtY2Q4YS00NTM2LTgyMDgtMDljZjI2YTdhMTMz&limit=2

Response

{
    "surveys": [
        {
            "captureDate": "2018-10-29",
            "firstPhotoTime": "2018-10-29T00:33:23Z",
            "id": "100-353f704a-dcaa-11e8-b148-c715c343620e",
            "lastPhotoTime": "2018-10-29T04:45:23Z",
            "location": {
                "country": "AU",
                "region": "Adelaide",
                "state": "SA"
            },
            "onlineTime": "2018-10-31T01:13:43Z",
            "pixelSize": 0.069,
            "resources": {
                "tiles": [
                    {
                        "id": "3540420e-dcaa-11e8-b14b-5b94392a0156",
                        "scale": 21,
                        "type": "Vert"
                    },
                ]
            },
            "timezone": "ACDT",
            "utcOffset": 37800
        },
        {
            "captureDate": "2018-08-22",
            "firstPhotoTime": "2018-08-22T00:17:33Z",
            "id": "100-4c51ffe8-ab52-11e8-9b7a-b3f8ca0bcb81",
            "lastPhotoTime": "2018-08-22T02:51:17Z",
            "location": {
                "country": "AU",
                "region": "Adelaide",
                "state": "SA"
            },
            "onlineTime": "2018-08-29T06:10:59Z",
            "pixelSize": 0.069,
            "resources": {
                "tiles": [
                    {
                        "id": "4c55ec3e-ab52-11e8-9b7d-437267690635",
                        "scale": 21,
                        "type": "Vert"
                    }
                ]
            },
            "timezone": "ACST",
            "utcOffset": 34200
        }
    ],
    "limit": 2,
    "offset": 0,
    "total": 66
}

Retrieve Content Boundaries for a Given Polygon

The following example is for Australian content.

NOTE: For a location other than in Australia, for example in the US, substitute the LONG LAT values.

Request - https://api.nearmap.com/coverage/v2/surveyresources/boundaries.geojson?polygon=138.59707796614592,-34.91729448760797,138.61703360121672,-34.91729448760797,138.61703360121672,-34.927709974005474,138.59707796614592,-34.927709974005474,138.59707796614592,-34.91729448760797&apikey={YOUR_API_KEY}

If you copy the request into a browser URL, you will see the full response. This is a partial response, including only one survey and only a small part of the MultiPolygon:

Response

{
    "type": "FeatureCollection",
    "features": [
        {
            "id": "100-c55168f8-b95d-11e7-bd91-43d8499f1906",
            "type": "Feature",
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                138.3820699065405,
                                -34.613007476508066
                            ],
                            [
                                138.38104070093576,
                                -34.65155251700606
                            ],
                            ....
                            [
                                138.3820699065405,
                                -34.613007476508066
                            ]
                        ]
                    ]
                ]
            },
            "properties": {
                "captureDate": "2009-10-19",
                "country": "AU",
                "firstPhotoTime": "2009-10-18T18:21:46Z",
                "lastPhotoTime": "2009-10-19T22:39:49Z",
                "onlineTime": "2018-02-09T03:32:38Z",
                "pixelSize": 0.08,
                "region": "Adelaide",
                "resourceClass": "tiles",
                "scale": 21,
                "state": "SA",
                "surveyID": "c54f488e-b95d-11e7-bd8e-5f787b2dc397",
                "timezone": "ACDT",
                "type": "Vert",
                "utcOffset": 37800
            }
        },
    ],
    "offset": 0,
    "total": 237
}

Retrieved coverage fields

Some of the retrieved coverage fields are the same as in the rest of the Coverage API, as detailed here. In addition you receive the multi-polygon that represents the survey boundaries for all surveys within your specified area.

Retrieve Aggregated Coverage Boundaries

Request - https://api.nearmap.com/coverage/v2/aggregate/boundaries.geojson?apikey=<your API key>

If you copy the request into a browser URL, you will see the full response. This is a partial response, including only a small part of the MultiPolygon:

Response (partial)

{
    "type":"FeatureCollection",
    "features":[
        {
            "type":"Feature",
            "geometry":{
                "type":"MultiPolygon",
                "coordinates":[
                    [
                        [
                            [
                                -73.39778063733444,
                                40.597624678639875
                            ],
                            [
                                -73.39692479743157,
                                40.597064516856086
                            ],
                            [
                                -73.39889835574029,
                                40.59471911929547
                            ]
                        ]
                    ]
                ]
            },
            "properties":{
                "type":"3D"
            }
        }
    ]
}
Retrieve Timestamp

Request - https://api.nearmap.com/coverage/v2/point/151.20732732009893,-33.86508868814692/timestamp.json?until=2024-02-25?apikey={YOUR_API_KEY}

Response

{
            "firstPhotoTime": "2024-04-09T01:27:09.484Z",
            "lastPhotoTime": "2024-04-09T01:29:41.176Z",
            "timestamp": "2024-04-09T01:29:41.176Z",
            "timezone": "AEST",
            "uncertaintySecs": 75,
            "utcOffset": 36000
           }