The SafeGraph Developer Hub

Welcome to the SafeGraph developer hub. You'll find comprehensive guides and documentation to help you start working with SafeGraph as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Places Overview and Schema

Overview

SafeGraph Places is a dataset containing 5 million polygons which represent commercial points of interest (POI) in the United States where people can spend money. The data contain POIs in all fifty states and each place has key business information, such as open hours and category. The dataset is also classified by brand for the top ~3,000 brands in the US.

SafeGraph updates the Places dataset every month with the past month's openings and closings and maintains a persistent SafeGraph Place ID (safegraph_place_id) across releases.

Schema

Places is comprised of two sets of pipe-delimited CSV files:

  • Points of Interest /poi/: ~5 million records where each record is a place of interest (POI).
  • Brand Information /brand_info/: ~3,000 records where each record is a distinct brand. A brand can be associated with many POI. For example, McDonald’s is represented as a single record in brand_info, and there are approximately 14K records in /poi/ associated with the McDonald’s brand.

Points of Interest (/poi/)

Column Name Description Type Example
safegraph_place_id Unique and consistent ID that is tied to this POI. String sg:64d0ee4695af4ab4906fe82997ead9ff
parent_safegraph_place_id If place is a tenant / sub-store inside a larger place (e.g. mall, airport, stadium), this lists the safegraph_place_id of the parent place, otherwise null. String sg:3134d87532ae4e32acf4007eb03eabb5
location_name The name of the place of interest. String Salinas Valley Ford Lincoln
safegraph_brand_ids Unique and consistent ID that represents this specific brand. List SG_BRAND_80ca06abfa1a5104af9a770f485dad07, SG_BRAND_aa45997477591e27601c436bcb228d6f
brands If this POI is an instance of a larger brand that we have explicitly identified, this column will contain that brand name. This is an easy way to, for example, unambiguously select all Target stores in the USA. A POI may have multiple brands, as in a new car dealership that sells ford and lincoln cars. List ford, lincoln
top_category The label associated with the first 4 digits of the POI’s NAICS category. String Automobile Dealers
subcategory The label associated with all 6 digits of the POI’s NAICS category. String New Car Dealers
naics_code 6-digit NAICS code describing the business. Integer 441110
latitude Latitude coordinate of the place of interest. Float 36.714767
longitude Longitude coordinate of the place of interest. String -121.662912
street_address Street address of the place of interest. String 1100 auto center circle
city The city in which this point of interest is located. String salinas
state The state (as postal code abbreviation) in which this point of interest is located. String il
zipcode Postal 5-digit ZIP code. Integer 93907
phone_number The phone number of this POI String +14151234567
open_hours A list of numbers; each pair describes the opening and associated closing time, in minutes, starting from midnight on Sunday (e.g. 360 = 6am on Sunday). String [600, 1080, 1950, 2640, 3390, 4080, 4830, 5520, 6270, 6960, 7710, 8400, 9150, 9840]
polygon_wkt The shape of the place of interest, formatted as Well-Known Text (WKT). String Polygon ((-121.66331045329571 36.715207502522354, …, -121.66331045329571 36.715207502522354))
polygon_class There are 2 possible values: 1) OWNED_POLYGON: indicates that the polygon describes the POI itself. 2) SHARED_POLYGON: indicates that at least two POI shared the same polygon. This could be, for example, because (a) the polygon is attached to this POI as well as a parent / enclosing structure (e.g. the mall that contains this POI), or (b) “peer” POI are given the single polygon (e.g. POI on different floors. String OWNED_POLYGON

Brand Info (/brand_info/)

Column Name Description Type Example
safegraph_brand_id Unique and consistent ID that represents this specific brand. String SG_BRAND_80ca06abfa1a5104af9a770f485dad07
brand_name This is the brand_name corresponding to the safegraph_brand_id. String Ford Motor Company
parent_safegraph_brand_id There are 2 possible values: 1) If this brand has a parent, this will list the ID of the parent brand. 2) If this brand has no parent, this will be null. String SG_BRAND_8310c2e3461b8b5a
naics_code 6-digit NAICS code describing the business. Integer 441110
top_category The label associated with the first 4 digits of the POI’s NAICS category. String Automobile Dealers
subcategory The label associated with all 6 digits of the POI’s NAICS category. String New Car Dealers