Skip to main content

Reverse Geocoding Batch

Contents

Batch reverse geocoding allows you to reverse geocode a batch of geographic coordinates into street addresses through a POST request. The request body contains the collection of coordinates to reverse geocode. The response returns a list of addresses in JSON format, as well as other information, including posted speed limits if the account is licensed for them.

POST /locations/reverse/batch

Resource URL

https://pcmiler.alk.com/apis/rest/v1.0/service.svc/locations/reverse/batch

Request Body

The request body consists of a JSON-formatted request object with a series of coordinates to reverse geocode.

ElementDefinitionRequired
requestA series of Reverse Geocode objects using the format below. Coords is the only required parameter. See a full list of available parameters.Y

Sample JSON POST Body

POST http://pcmiler.alk.com/apis/rest/v1.0/service.svc//locations/reverse/batch?dataset=PCM_NA HTTP/1.1

{
    "request": {
        "Coords": [{
                "Lat": 39.958188,
                "Lon": -75.163244,
                "Region": 4,
                "SpeedLimitOption": {
                    "CurrentSpeed": 40,
                    "Heading": 290,
                    "Urban": true,
                    "Vehicle": 3,
                    "SpeedLimitPreference": 4,
                    "IncludeLinkInfo": false,
                    "IgnoreDefaultSpeeds": true
                },
                "Timestamp": "2022-06-21 12:30 PM"
            }, {
                "Lat": 40.957645,
                "Lon": -75.168672,
                "Region": 4,
                "SpeedLimitOption": {
                    "CurrentSpeed": 50,
                    "Heading": 150,
                    "Urban": false,
                    "Vehicle": 0,
                    "SpeedLimitPreference": 4,
                    "IncludeLinkInfo": false,
                    "IgnoreDefaultSpeeds": true
                },
                "Timestamp": "2022-06-21 3:30 PM"
            }, {
                "Lat": 40.064848,
                "Lon": -75.277189,
                "Region": 4,
                "SpeedLimitOption": {
                    "CurrentSpeed": 40,
                    "Heading": 180,
                    "Urban": false,
                    "Vehicle": 0,
                    "SpeedLimitPreference": 1,
                    "IncludeLinkInfo": false,
                    "IgnoreDefaultSpeeds": true
                },
                "Timestamp": "2022-06-21 7:30 PM"
            }
        ],
        "MatchNamedRoadsOnly": false,
        "MaxCleanupMiles": 1,
        "IncludePostedSpeedLimit": true,
        "CountryAbbrevType": 0,
        "PreferredCityLanguage": 0,
        "Units": 0,
        "SplitHouseNumber": true,
        "FPCCode": 1

    }
}

Response Body

The request body consists of a JSON formatted array of location objects.

Sample Response

{
    "ReverseGeoBatchResult": [{
            "Address": {
                "StreetAddress": "Vine Street West",
                "City": "Philadelphia",
                "State": "PA",
                "Zip": "19102",
                "County": "Philadelphia",
                "Country": "United States",
                "SPLC": null,
                "CountryPostalFilter": 0,
                "AbbreviationFormat": 0,
                "StateName": "Pennsylvania",
                "StateAbbreviation": "PA",
                "CountryAbbreviation": "US"
            },
            "Coords": {
                "Lat": "39.958188",
                "Lon": "-75.163244"
            },
            "Region": 4,
            "Label": "",
            "PlaceName": "",
            "TimeZone": "EDT",
            "Errors": [],
            "SpeedLimitInfo": {
                "Speed": 35,
                "SpeedType": 2,
                "SpeedTypeString": "Premium",
                "LinkIds": null,
                "RoadClass": "Secondary",
                "Units": "MPH"
            },
            "ConfidenceLevel": "Exact",
            "DistanceFromRoad": 0,
            "CrossStreet": null
        }, {
            "Address": {
                "StreetAddress": "|||1341||| Totts Gap Hill Road",
                "City": "Stroudsburg",
                "State": "PA",
                "Zip": "18360",
                "County": "Monroe",
                "Country": "United States",
                "SPLC": null,
                "CountryPostalFilter": 0,
                "AbbreviationFormat": 0,
                "StateName": "Pennsylvania",
                "StateAbbreviation": "PA",
                "CountryAbbreviation": "US"
            },
            "Coords": {
                "Lat": "40.957645",
                "Lon": "-75.168672"
            },
            "Region": 4,
            "Label": "",
            "PlaceName": "",
            "TimeZone": "EDT",
            "Errors": [],
            "SpeedLimitInfo": {
                "Speed": 45,
                "SpeedType": 4,
                "SpeedTypeString": "LinkBased",
                "LinkIds": null,
                "RoadClass": "Local",
                "Units": "MPH"
            },
            "ConfidenceLevel": "Exact",
            "DistanceFromRoad": 0.03,
            "CrossStreet": null
        }, {
            "Address": {
                "StreetAddress": "Schuylkill Expressway  (I-76)",
                "City": "Gladwyne",
                "State": "PA",
                "Zip": "19035",
                "County": "Montgomery",
                "Country": "United States",
                "SPLC": null,
                "CountryPostalFilter": 0,
                "AbbreviationFormat": 0,
                "StateName": "Pennsylvania",
                "StateAbbreviation": "PA",
                "CountryAbbreviation": "US"
            },
            "Coords": {
                "Lat": "40.064848",
                "Lon": "-75.277189"
            },
            "Region": 4,
            "Label": "",
            "PlaceName": "",
            "TimeZone": "EDT",
            "Errors": [],
            "SpeedLimitInfo": {
                "Speed": 55,
                "SpeedType": 2,
                "SpeedTypeString": "Premium",
                "LinkIds": null,
                "RoadClass": "Interstate",
                "Units": "MPH"
            },
            "ConfidenceLevel": "Exact",
            "DistanceFromRoad": 0.002,
            "CrossStreet": null
        }
    ]
}
Last updated February 24, 2022.
Contents