You may combine multiple attributes to get specific results. For example, search place details of a brand with certain NAICS code or details of a brand within a city. Notice the use of 'city' as the 'address' attribute here. You may also use other address attributes here like street address or region etc. Applying multiple attributes, get desired fields from SafeGraph Core, Geometry, or Patterns data sets.
query {
search(
filter: {
brand: "Starbucks"
address: {
city: "San Francisco",
region: "CA"
}
}
) {
places {
results(first:5) {
edges {
node {
placekey
safegraph_core {
latitude
longitude
street_address
city
region
postal_code
iso_country_code
brands {
brand_id
brand_name
}
}
}
}
}
}
}
}
{
"data": {
"search": {
"places": {
"results": {
"edges": [
{
"node": {
"placekey": "222-222@5vg-7gr-py9",
"safegraph_core": {
"latitude": 37.785953,
"longitude": -122.439768,
"street_address": "1750 Divisadero St",
"city": "San Francisco",
"region": "CA",
"postal_code": "94115",
"iso_country_code": "US",
"brands": [
{
"brand_id": "SG_BRAND_f116acfe9147494063e58da666d1d57e",
"brand_name": "Starbucks"
}
]
}
}
},
{
"node": {
"placekey": "222-223@5vg-7gt-7nq",
"safegraph_core": {
"latitude": 37.788395,
"longitude": -122.393642,
"street_address": "299 Fremont St",
"city": "San Francisco",
"region": "CA",
"postal_code": "94105",
"iso_country_code": "US",
"brands": [
{
"brand_id": "SG_BRAND_f116acfe9147494063e58da666d1d57e",
"brand_name": "Starbucks"
}
]
}
}
},
{
"node": {
"placekey": "222-224@5vg-7gr-6kz",
"safegraph_core": {
"latitude": 37.769035,
"longitude": -122.427742,
"street_address": "2020 Market St",
"city": "San Francisco",
"region": "CA",
"postal_code": "94114",
"iso_country_code": "US",
"brands": [
{
"brand_id": "SG_BRAND_f116acfe9147494063e58da666d1d57e",
"brand_name": "Starbucks"
}
]
}
}
},
{
"node": {
"placekey": "222-224@5vg-7h2-6c5",
"safegraph_core": {
"latitude": 37.76711,
"longitude": -122.393818,
"street_address": "1700 Owens St",
"city": "San Francisco",
"region": "CA",
"postal_code": "94158",
"iso_country_code": "US",
"brands": [
{
"brand_id": "SG_BRAND_f116acfe9147494063e58da666d1d57e",
"brand_name": "Starbucks"
}
]
}
}
},
{
"node": {
"placekey": "222-228@5vg-7gr-rx5",
"safegraph_core": {
"latitude": 37.782084,
"longitude": -122.447081,
"street_address": "2675 Geary Blvd",
"city": "San Francisco",
"region": "CA",
"postal_code": "94118",
"iso_country_code": "US",
"brands": [
{
"brand_id": "SG_BRAND_f116acfe9147494063e58da666d1d57e",
"brand_name": "Starbucks"
}
]
}
}
}
]
}
}
}
},
"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"
]
}
}