Maps Census

v1.0.0
io.scrap/maps-census Checked 3 days ago Published 19 days ago

Statistics on Google Maps businesses by place and business type: counts, shares and online presence.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_report Create a Maps Census report

Create a Maps Census report: counts of Google Maps places for business types in a zone, with optional filters, rows split by one dimension and a measure in columns. Returns the report URL at once; call get_report for the figures. Each row costs one count, plus one per column (two for a share).

ParameterTypeDescription
country_code *stringISO 3166-1 alpha-2 country code, e.g. "FR" or "US".
admin1stringRegion or state, by name ("Île-de-France", "California") or code ("11", "CA").
admin2stringDepartment or county, by name or code. In the United States, give admin1 too.
breakdownstringHow the rows split the set: none (one row), type (one row per type, two types at least), location (one row per zone, see location_level), rating, reviews or phone (one row per band; phone not in US, C…
chartsarrayCharts on the report page, above its table. Default: bars.
citystringCity name.
columnsstringWhat the columns show: indicator (the share of each row with each indicator), type, rating, reviews or phone (a cross table; phone not in US, CA, DO, PR, MX, CL, DK, where landline and mobile numbers…
full_reportbooleantrue only when the user asks for a written report, a PDF or a page to share: the report then gets a written analysis and a PDF, a minute or two after the counts. Leave it false when the user only want…
gmap_first_seen_at_gtestringOnly places first indexed on or after this date, YYYY-MM-DD.
gmap_first_seen_at_ltestringOnly places first indexed on or before this date, YYYY-MM-DD.
gmap_has_phonebooleantrue: only places with a phone number; false: only places without one.
gmap_has_websitebooleantrue: only places with a website; false: only places without one.
gmap_is_closedbooleantrue: only places marked permanently closed; false: only places not marked closed.
gmap_is_main_typebooleantrue: only places whose main type is one of the types; false: only places where it is a secondary type.
gmap_phone_typestringOnly places with this phone type; not in US, CA, DO, PR, MX, CL, DK, where landline and mobile numbers cannot be told apart.
gmap_reviews_count_gteintegerMinimum review count: 0, 50, 200, 500 or 501 (more than 500).
gmap_reviews_count_lteintegerMaximum review count: 0, 50, 200, 500 or 501 (more than 500).
gmap_reviews_rating_gtenumberMinimum rating, 0 to 5.
gmap_reviews_rating_ltenumberMaximum rating, 0 to 5.
indicatorsarrayIndicators of indicator rows or columns, 12 at most. Default: website, email, phone, Facebook, Instagram, LinkedIn, less the filters given.
localestringLanguage of the report, its labels and its URL. Default: en.
location_levelstringZone level of the rows when breakdown is location. Default: the level just under the zone.
measurestringFor a cross table: count (places per cell) or share (the share of each cell with share_indicator). Default: count.
share_indicatorstringThe indicator a share measure counts.
titlestringReport title, 120 characters at most. Default: built from the types and the zone.
typesarrayBusiness types: slugs ("dentist") or names in the report language ("Dentiste"). Omit for all businesses.
website_has_ad_pixelsbooleanSame, for ad pixels.
website_has_contact_pagesbooleanSame, for a contact page.
website_has_emailsbooleantrue: only places whose website shows an email; false: only places whose website shows none.
website_has_facebookbooleanSame, for a Facebook link.
website_has_instagrambooleanSame, for an Instagram link.
website_has_linkedinbooleanSame, for a LinkedIn link.
website_has_tiktokbooleanSame, for a TikTok link.
website_has_twitterbooleanSame, for an X (Twitter) link.
website_has_youtubebooleanSame, for a YouTube link.

get_report Get a Maps Census report

Get a Maps Census report. Once ready: its title, criteria, table (a header line, then one line per group; raw counts, with the legend's marks for hidden figures) and key points, plus the PDF URL for a full report. Until then: the status and when to retry. The status is counting, then for a full report writing (the written analysis) and pdf (the PDF being built), then ready.

ParameterTypeDescription
report_id *stringThe report_id create_report returned, also the last part of the report URL.