Supported Location API

/locations.json API allows you to search SerpApi supported locations.

You can query https://serpapi.com/locations.json using a GET request, using these optional parameters: q param searches location name that contains it, and limit param limits the number of locations returned. It should return an array of locations ordered by reach. Locations that reach the most people will be first. This API is free to use.

I.e. https://serpapi.com/locations.json?q=seattle&limit=2 return the 2 biggest location that contains "seattle" in their name in our database:

[
  {
    "_id": {
      "$oid": "585069bdee19ad271e9bc0cc"
    },
    "canonical_name": "Seattle-Tacoma,WA,Washington,United States",
    "country_code": "US",
    "google_id": 200819,
    "google_parent_id": 21180,
    "gps": [
      -122.3088165,
      47.4502499
    ],
    "name": "Seattle-Tacoma, WA",
    "reach": 7450000,
    "target_type": "DMA Region"
  },
  {
    "_id": {
      "$oid": "585069b9ee19ad271e9baf50"
    },
    "canonical_name": "Seattle,Washington,United States",
    "country_code": "US",
    "google_id": 1027744,
    "google_parent_id": 21180,
    "gps": [
      -122.3320708,
      47.6062095
    ],
    "name": "Seattle",
    "reach": 5430000,
    "target_type": "City"
  }
]

You can then use the location canonical name (i.e. "Seattle-Tacoma, WA,Washington,United States") or the location id (i.e. "585069efee19ad271e9c9b36") as the value of the param location for the /search API to get more precise results.