City Search

Search the database for a list of cities that match a specific query string.

Endpoint

https://www.pollstar.com/api/v2/cities/search/{cityName}

Parameters

cityName
The name of the city to find.
page
[optional] The zero-based index of the page number to select. Selecting a page number that is higher than the number of available pages will succeed with an empty response.
pageSize
[optional] The size of each page. Using a combination of the page and pageSize parameters, you can create a custom paging solution. The default pageSize is 20.

Remarks

This endpoint will return a list of matching cities based on the cityName parameter. It does not guarantee that a unique artist will be returned – it will return all cities that match some part of the search string, ranked by most likely match first. The higher the value of the rank element in the result set, then the higher the probability of an exact match to the query string.

The returned cityId value can be used as a parameter for the Get City Routebook and Get Local Venues endpoints.

Example

To find the first page of cities that match the query string “southampton“:

https://www.pollstar.com/api/v2/cities/search/southampton?page=0&pageSize=5

Response

{
    "page": 0,
    "pageSize": 5,
    "totalCities": 6,
    "cities": [
        {
            "id": 68895,
            "name": "Southampton",
            "displayName": "Southampton, United Kingdom",
            "url": "https://www.pollstar.com/city/southampton-68895",
            "latitude": 50.900001525878906,
            "longitude": -1.3999999761581421,
            "rank": 772.418,
            "state": {
                "id": 225,
                "name": "",
                "abbrev": "",
                "country": {
                    "id": 104,
                    "name": "United Kingdom"
                }
            }
        },
        {
            "id": 73883,
            "name": "Southampton",
            "displayName": "Southampton, Bermuda",
            "url": "https://www.pollstar.com/city/southampton-73883",
            "latitude": 32.267342,
            "longitude": -64.880493,
            "rank": 587.418,
            "state": {
                "id": 137,
                "name": "",
                "abbrev": "",
                "country": {
                    "id": 15,
                    "name": "Bermuda"
                }
            }
        },
        {
            "id": 52822,
            "name": "Southampton",
            "displayName": "Southampton, NY",
            "url": "https://www.pollstar.com/city/southampton-52822",
            "latitude": 40.895662032802967,
            "longitude": -72.402095240020969,
            "rank": 523.8385,
            "state": {
                "id": 65,
                "name": "New York",
                "abbrev": "NY",
                "country": {
                    "id": 105,
                    "name": "United States"
                }
            }
        },
        {
            "id": 52823,
            "name": "Southampton",
            "displayName": "Southampton, PA",
            "url": "https://www.pollstar.com/city/southampton-52823",
            "latitude": 40.1890926235435,
            "longitude": -75.005906785602491,
            "rank": 495.83847,
            "state": {
                "id": 71,
                "name": "Pennsylvania",
                "abbrev": "PA",
                "country": {
                    "id": 105,
                    "name": "United States"
                }
            }
        },
        {
            "id": 52821,
            "name": "Southampton",
            "displayName": "Southampton, NJ",
            "url": "https://www.pollstar.com/city/southampton-52821",
            "latitude": 39.820757,
            "longitude": -74.694484,
            "rank": 493.83847,
            "state": {
                "id": 58,
                "name": "New Jersey",
                "abbrev": "NJ",
                "country": {
                    "id": 105,
                    "name": "United States"
                }
            }
        }
    ]
}
<root>
    <page>0</page>
    <pageSize>5</pageSize>
    <totalCities>6</totalCities>
    <cities>
        <city>
            <id>68895</id>
            <name>Southampton</name>
            <displayName>Southampton, United Kingdom</displayName>
            <url>https://www.pollstar.com/city/southampton-68895</url>
            <rank>772.418</rank>
            <state>
                <id>225</id>
                <name></name>
                <abbrev></abbrev>
                <country>
                    <id>104</id>
                    <name>United Kingdom</name>
                </country>
            </state>
        </city>
        <city>
            <id>73883</id>
            <name>Southampton</name>
            <displayName>Southampton, Bermuda</displayName>
            <url>https://www.pollstar.com/city/southampton-73883</url>
            <rank>587.418</rank>
            <state>
                <id>137</id>
                <name></name>
                <abbrev></abbrev>
                <country>
                    <id>15</id>
                    <name>Bermuda</name>
                </country>
            </state>
        </city>
        <city>
            <id>52822</id>
            <name>Southampton</name>
            <displayName>Southampton, NY</displayName>
            <url>https://www.pollstar.com/city/southampton-52822</url>
            <rank>523.8385</rank>
            <state>
                <id>65</id>
                <name>New York</name>
                <abbrev>NY</abbrev>
                <country>
                    <id>105</id>
                    <name>United States</name>
                </country>
            </state>
        </city>
        <city>
            <id>52823</id>
            <name>Southampton</name>
            <displayName>Southampton, PA</displayName>
            <url>https://www.pollstar.com/city/southampton-52823</url>
            <rank>495.83847</rank>
            <state>
                <id>71</id>
                <name>Pennsylvania</name>
                <abbrev>PA</abbrev>
                <country>
                    <id>105</id>
                    <name>United States</name>
                </country>
            </state>
        </city>
        <city>
            <id>52821</id>
            <name>Southampton</name>
            <displayName>Southampton, NJ</displayName>
            <url>https://www.pollstar.com/city/southampton-52821</url>
            <rank>493.83847</rank>
            <state>
                <id>58</id>
                <name>New Jersey</name>
                <abbrev>NJ</abbrev>
                <country>
                    <id>105</id>
                    <name>United States</name>
                </country>
            </state>
        </city>
    </cities>
</root>

 

%d bloggers like this: