Places Search API for Web

This guide explains how to get information about places. Places are represented by PlaceInformation nodes in the Graph API.

Before You Start

  • No permissions are required if you are accessing PlaceInformation node fields. These fields are publicly accessible.
  • The Pages Public Content Access feature is required when using field expansion to query fields on a Page node associated with a PlaceInformation node.
  • The Pages Public Content Access feature is required when querying edges on PlaceInformation nodes since they access content on a Page node associated with a PlaceInformation node.

Query a Place

Send a GET request to:

/search?type=place

Either the q or center parameter must be included in your query.

Sample request:

curl -X GET "https://graph.facebook.com/search?type=place
    &q=McDonalds
    &fields=name,checkins,website
    &access_token={access-token}"

Sample Response:

{
  "data": [
    {
      "name": "McDonald's",
      "checkins": 1372,
      "website": "https://www.mcdonalds.com/us/en-us/location/CA/MENLO-PARK/1100-EL-CAMINO-REAL/2512.html?cid=RF%3AYXT%3AFB%3A%3AClicks",
      "id": "1620718444609197"
    },
    {
      "name": "McDonald's",
      "checkins": 4017,
      "website": "https://www.mcdonalds.com/us/en-us/location/CA/REDWOOD-CITY/185-CHESTNUT-ST/416.html?cid=RF%3AYXT%3AFB%3A%3AClicks",
      "id": "1634339073261421"
    },
    {
      "name": "McDonald's",
      "checkins": 2710,
      "website": "https://www.mcdonalds.com/us/en-us/location/CA/EAST-PALO-ALTO/1721-E-BAYSHORE-AVENUE/25758.html?cid=RF%3AYXT%3AFB%3A%3AClicks",
      "id": "1851961451504619"
    },
...

Reference

Query String Parameters

Name Description

categories

Restrics your query to places that match one or more categories, specified in an array. For example, ["FOOD_BEVERAGE","HOTEL_LODGING"]. Available categories: ARTS_ENTERTAINMENT, EDUCATION, FITNESS_RECREATION, FOOD_BEVERAGE, HOTEL_LODGING, MEDICAL_HEALTH, SHOPPING_RETAIL, TRAVEL_TRANSPORTATION.

center

The latitude and longitude of the search. For example, 37.4683,-122.1439. Required if you omit q from your query. If you omit center from your query, PlaceInformation nodes in the response will not be associated with any particular location.

distance

Distance in meters from the center. If you omit the center parameter from your query, omit distance as well.

fields

The PlaceInformation fields you want returned. Separate fields by commas. For example, name,checkins,cover,link.

q

Name of the place to search for. Required if you omit center from your query. Places that best match this value will be returned by the API.

Limitations

  • Queries on the GET /search?type=place endpoint using API versions 2.12 or older will return Page objects.
  • Queries using newer versions of the API return PlaceInformation objects.
  • If you are using versions 3.0+ of the API and need to get the ID of the Page associated with a PlaceInformation object, include the fields=page parameter in your query, or query the GET /{place-information-id}?fields=page endpoint.
  • Using center, distance, q, and catergories together in a query will give no results.