The Visits API is an asynchonous API that allows you to specify a date range of up to one year for a given set of location polygons. The API returns summarized information about the people who visited those locations.
The report downloads will be in gzipped csv format. The response will have 3 links. If a user has passed in a report name, the report name will be used as a prefix on the files. The suffix of the files will be: visit_data.csv.gz, home_location_data.csv.gz, and cross_location_data.csv.gz. For example, if a report name is “cafe_comparison”, the visit report would be called cafe_comparison_visit_data.csv.gz.
The visits report calculates, for a given set of search locations, the total number of visits to each location grouped by the year, month, day of month, day of week, and hour of day.
Home Location Example
The home location report matches visitors to their home neighborhood at the census block level. This makes it easy to characterize visitor travel distances and trade areas associated with each location, as well as to match visits to demographics data. For a given set of search locations, the report calculates the total number of visits and the number of unique visitors seen grouped by a home neighborhood census block.
Cross Location Example
The cross location report is similar to the home locations report, except that it looks at the sharing of visitors between locations. Each row in the cross locations report table describes the number of visitors who live in a particular census block that visited both of two different locations, as well as the number of visits made by these individuals to each of the two locations.
In the example below, three individuals living in census block 390351235012003 were observed visiting both the cloud_city_maple_leaf and the starbucks_freemont_ave stores. These three people visited cloud_city_maple_leaf six times, and starbucks_freemont_ave 12 times over the course of the analysis time period.
This report is useful for describing the amount of competition between two locations, the rate of same-brand cannibalization, the success of cross promotions, and a great number of other things.
POST Send a visit report request
|reportName||Body||String||The given name of the report which will be used in file naming and email notifications. Supported standard characters for the report name: “0-9 a-z A-Z -_.” Spaces are not recommended and may be removed. A max name length of 50.|
|dateRanges||Body||String||The date range to include in the report. Only one date range is currently supported, with a max range of 1 yr.|
|locations||Body||String||an array of geojson defining polygons for analysis. A max of 1000 locations per request.|
|summaryTypes||Body||String||an array of strings for determining the types of summaries generated. Can be one or more of ["visit_data" | "home_location_data" | "cross_location_data"]. The default is to generate all three types. To help reduce generation time, it is recommended to specify only what you are interested in.|
|emailAddresses||Body||String||an array of email addresses to notify on report completion|
Example visit report request acceptedBody
400 Bad request
500 Internal Error
GET Get status of a report
|reportId||Path||String||The visits report id you were given in the post response. Used to get the returned data|