Locations API

Introduction

Locations API allows you to search WebScrapingAPI supported locations. This API is free to use.

In this documentation you will find detailed usage guides and code examples that will help you get up and running in the shortest time possible. If the articles below leave any questions unanswered, please feel free to contact our technical support team.

Basic Request

The URL below retrieves the first 5 locations that contains “Austin” in their name in our database. You can then use a string composed of all location’ properties (e.g. "1001982","Austin","Austin,Manitoba,Canada","20115","CA","City",Active) as the value of the param location for the search API to get more precise results.

You can download the full JSON list of supported locations here.

HTTP Request

GET external-link
https://locations.webscrapingapi.com?q=Austin&limit=5
Code to integrate
external-link
Response Example external-link
[
    {
        "Criteria ID": "1001982",
        "Name": "Austin",
        "Canonical Name": "Austin,Manitoba,Canada",
        "Parent ID": "20115",
        "Country Code": "CA",
        "Target Type": "City",
        "Status": "Active"
    },
    {
        "Criteria ID": "1014438",
        "Name": "Austin",
        "Canonical Name": "Austin,Colorado,United States",
        "Parent ID": "21138",
        "Country Code": "US",
        "Target Type": "Neighborhood",
        "Status": "Active"
    },
    {
        "Criteria ID": "1016989",
        "Name": "Austin",
        "Canonical Name": "Austin,Indiana,United States",
        "Parent ID": "21148",
        "Country Code": "US",
        "Target Type": "City",
        "Status": "Active"
    },
    {
        "Criteria ID": "1019697",
        "Name": "Austin",
        "Canonical Name": "Austin,Minnesota,United States",
        "Parent ID": "21156",
        "Country Code": "US",
        "Target Type": "City",
        "Status": "Active"
    },
    {
        "Criteria ID": "1023545",
        "Name": "Austinburg",
        "Canonical Name": "Austinburg,Ohio,United States",
        "Parent ID": "21168",
        "Country Code": "US",
        "Target Type": "City",
        "Status": "Active"
    }
]
Request Parameters
q
Optional

Searches locations that contain the supplied string.

limit
Optional

Specifies the number of locations returned.

API Errors
400

Bad Request – Your request is invalid or has invalid parameters.

404

Not Found – The specified endpoint could not be found or the method is invalid.

500

Internal Server Error – We had a problem with our server. Try again later.

503

Service Unavailable – We’re temporarily offline for maintenance. Please try again later.