You may search for places by NAICS code. Simply enter naics_code in the search filter and get SafeGraph Core, Geometry, or Patterns data that match the submitted code.

query {
  search(first: 5 filter: { 
    naics_code: 722515 
  }) {
    placekey
    safegraph_weekly_patterns (date: "2021-07-26") {
      location_name
      street_address
      city
      region
      brands
      raw_visit_counts
      visits_by_day
    }
  }
}
curl --location --request POST 'https://api.safegraph.com/v1/graphql' \
--header 'apikey: {your-api-key}' \
--header 'content-type: application/json' \
--data-raw '{"query":"query {\n  search(first: 5 filter: { \n    naics_code: 722515 \n  }) {\n    placekey\n    safegraph_weekly_patterns (date: \"2021-07-26\") {\n      location_name\n      street_address\n      city\n      region\n      brands\n      raw_visit_counts\n      visits_by_day\n    }\n  }\n}","variables":{}}'
# pip install safegraphQL
import safegraphql.client as sgql

sgql_client = sgql.HTTP_Client(apikey = 'your-api-key')

naics = 722515
cols = [
    'location_name',
    'street_address',
    'city',
    'region',
    'brands',
    'raw_visit_counts',
    'visits_by_day'
]

sgql_client.search(product = 'weekly_patterns', date = '2021-07-06', naics_code = naics, columns = cols, max_results = 5)
{
  "data": {
    "search": [
      {
        "placekey": "[email protected]",
        "safegraph_weekly_patterns": {
          "location_name": "Dad's Ice Cream",
          "street_address": "3125 S 32nd St",
          "city": "Abilene",
          "region": "TX",
          "brands": "",
          "raw_visit_counts": 7,
          "visits_by_day": [
            0,
            0,
            0,
            0,
            0,
            5,
            2
          ]
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_weekly_patterns": {
          "location_name": "Localgreens",
          "street_address": "1841 S Federal Hwy Unit 400",
          "city": "Delray Beach",
          "region": "FL",
          "brands": "",
          "raw_visit_counts": 22,
          "visits_by_day": [
            0,
            1,
            1,
            3,
            6,
            10,
            1
          ]
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_weekly_patterns": {
          "location_name": "Panera Bread",
          "street_address": "10160 Reisterstown Rd Ste 10",
          "city": "Garrison",
          "region": "MD",
          "brands": "Panera Bread",
          "raw_visit_counts": 85,
          "visits_by_day": [
            13,
            9,
            13,
            15,
            11,
            15,
            9
          ]
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_weekly_patterns": {
          "location_name": "Cratty Shack",
          "street_address": "21 E State St",
          "city": "Colfax",
          "region": "IA",
          "brands": "",
          "raw_visit_counts": 68,
          "visits_by_day": [
            11,
            9,
            7,
            9,
            9,
            3,
            20
          ]
        }
      },
      {
        "placekey": "[email protected]",
        "safegraph_weekly_patterns": {
          "location_name": "Tim Hortons",
          "street_address": "852 Niagara Street",
          "city": "Welland",
          "region": "ON",
          "brands": "Tim Hortons",
          "raw_visit_counts": 20,
          "visits_by_day": [
            3,
            2,
            5,
            3,
            0,
            1,
            6
          ]
        }
      }
    ]
  },
  "extensions": {
    "row_count": 5,
    "version_date": "1627739802__2021_07"
  }
}