Places
Places are administrative areas such as neighborhoods, cities, counties etc.. They can be used to define geographical boundaries and therefore content within those boundaries.
List Places
GET https://seeclickfix.com/api/v2/places
Returns a list of places closest to point
.
Required Parameters
- Point - See how to specify a geography for the latitude and longitude or address syntax.
Optional Parameters
- Pagination - See how to specify pagination
Order
The sort order is by distance from Point.
Examples
$ curl -i https://seeclickfix.com/api/v2/places?address=New+Haven,+CT
Returns the 20 closest places.
Status: 200 OK
{
"errors": null,
"metadata": {
"pagination": {
"next_page": 2,
"next_page_url": "https://seeclickfix.com/api/api/v2/<ENDPOINT>?page=2",
"page": 1,
"pages": 40457,
"per_page": 20,
"previous_page": "null",
"previous_page_url": "null"
}
},
"places": [
{
"id": 3039,
"name": "New Haven",
"url_name": "new-haven",
"county": "New Haven",
"state": "CT",
"center": {
"type": "Point",
"coordinates": [
-72.92415951148533,
41.31037258994274
]
},
"place_type": "City",
"avatar": {
"full": "http://seeclickfix.com/files/place/place_avatar/3039/IMG_6892_1_.JPG",
"square": "http://seeclickfix.com/files/place/place_avatar/3039/IMG_6892_1__square.JPG"
},
"url": "https://seeclickfix.com/api/v2/places/3039",
"html_url": "http://seeclickfix.com/new-haven",
"html_report_url": "http://seeclickfix.com/new-haven/report"
}
]
}
Show Place
GET https://seeclickfix.com/api/v2/places/:id
Returns a single place by :id
.
Examples
$ curl -i https://seeclickfix.com/api/v2/places/1
Status: 200 OK
{
"id": 3039,
"name": "New Haven",
"url_name": "new-haven",
"county": "New Haven",
"state": "CT",
"center": {
"type": "Point",
"coordinates": [
-72.92415951148533,
41.31037258994274
]
},
"place_type": "City",
"avatar": {
"full": "http://seeclickfix.com/files/place/place_avatar/3039/IMG_6892_1_.JPG",
"square": "http://seeclickfix.com/files/place/place_avatar/3039/IMG_6892_1__square.JPG"
},
"url": "https://seeclickfix.com/api/v2/places/3039",
"html_url": "http://seeclickfix.com/new-haven",
"html_report_url": "http://seeclickfix.com/new-haven/report"
}
Errors
Returns error code 404 if no results are found.
Status: 404 Not Found