Search by Radius enables you to search for all the locations around a set of coordinates.

Furthermore, since by_radius is just a filter parameter, other subsequent filters can be added like NAICS or Brand. Currently, 'by_radius` cannot be combined with Category or Address filters.

The maximum search radius is 5000 meters.

In this example, we're searching for the first 10 locations with the Full-Service Restaurants NAICS code (722511), within a radius.

query {
  search(
    filter: {
      by_radius: {
        latitude: 37.78247
        longitude: -122.407752
        distanceInMeters: 100
      }
      naics_code: 722511
    }
  ) {
    places {
      results(first: 10) {
        edges {
          node {
            placekey
            safegraph_core {
              location_name
              street_address
              city
              region
              iso_country_code
            }
          }
        }
      }
    }
  }
}
{
  "data": {
    "search": {
      "places": {
        "results": {
          "edges": [
            {
              "node": {
                "placekey": "[email protected]",
                "safegraph_core": {
                  "location_name": "Burma Club",
                  "street_address": "8 Mint Plz",
                  "city": "San Francisco",
                  "region": "CA",
                  "iso_country_code": "US"
                }
              }
            },
            {
              "node": {
                "placekey": "[email protected]",
                "safegraph_core": {
                  "location_name": "JT Restaurant",
                  "street_address": "953 Mission St",
                  "city": "San Francisco",
                  "region": "CA",
                  "iso_country_code": "US"
                }
              }
            },
            {
              "node": {
                "placekey": "[email protected]",
                "safegraph_core": {
                  "location_name": "54 Mint Ristorante Italiano",
                  "street_address": "16 Mint Plz",
                  "city": "San Francisco",
                  "region": "CA",
                  "iso_country_code": "US"
                }
              }
            },
            {
              "node": {
                "placekey": "[email protected]",
                "safegraph_core": {
                  "location_name": "Bowl'D Acai",
                  "street_address": "14 Mint Plz",
                  "city": "San Francisco",
                  "region": "CA",
                  "iso_country_code": "US"
                }
              }
            },
            {
              "node": {
                "placekey": "[email protected]",
                "safegraph_core": {
                  "location_name": "Hashiri",
                  "street_address": "4 Mint Plz",
                  "city": "San Francisco",
                  "region": "CA",
                  "iso_country_code": "US"
                }
              }
            }
          ]
        }
      }
    }
  },
  "extensions": {
    "row_count": 5,
    "version_date": [
      "safegraph_core: 1645948803__2022_02",
      "safegraph_geometry: 1645948803__2022_02",
      "safegraph_weekly_patterns2: 2022_01_11",
      "safegraph_monthly_patterns: 2022_01_11"
    ]
  }
}