placegraph
v0.1.0Google Maps as a knowledge graph: competitor clusters, territory leads, site selection, reviews.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
competitor_graph Competitor knowledge graph
Search a category in an area and build the graph of places Google shows under 'People also search for' next to each result. Returns the category anchors (places most often listed: the ones customers compare) and communities (brand neighbourhoods). Slow (5-15 min) and the costliest tool: about $0.002 per place + $0.003 per competitor entry.
| Parameter | Type | Description |
|---|---|---|
location * | string | Area, e.g. 'Austin, TX' or 'lat,lng' |
query * | string | What to search, e.g. 'coffee shop' |
competitors_per_place | integer | PAS entries per place (default 10; Google shows up to 24) |
include_off_category | boolean | Keep PAS places of other categories in the analysis (default false) |
language | string | Google language code (default en) |
max_cost_usd | number | Refuse to start if the estimated cost is above this (USD). Default 5. |
max_places | integer | Seed places from the search (default 30) |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
territory_leads Territory leads (grid search)
Every business of a kind in an area: the area is split into a grid so results go past Google's ~120-per-search cap, deduplicated by place id; only places inside the radius are kept and charged. max_places counts those, so it caps cost. Returns a summary (categories, ratings, contact coverage), the lowest-rated leads and join-key coverage. Then enrich_leads adds each lead's competitors. Takes 5-15 min for ~25 cells.
| Parameter | Type | Description |
|---|---|---|
location * | string | City or 'lat,lng' at the centre of the area |
query * | string | e.g. 'dentist' |
cell_km | number | Grid cell size (default 2; 0.5-1 in dense downtowns, 3-5 in suburbs) |
language | string | |
max_cells | integer | Cap on grid cells (default 25) |
max_cost_usd | number | Refuse to start if the estimated cost is above this (USD). Default 5. |
max_places | integer | Cap on places (default 500) |
radius_km | number | Search radius (default 10) |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
enrich_leads Enrich leads with their competitors
For leads picked from a finished territory_leads job, read who Google lists under 'People also search for' and score each lead against those competitors (rating gap, review share). 'lowest_rated' (default) finds places trailing their competitors. About $0.03 per lead with 10 competitors.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | A finished territory_leads job |
categories | array | Only these categories, e.g. ['Dentist', 'Cosmetic dentist'] |
competitors_per_place | integer | Default 10 |
max_cost_usd | number | Refuse to start if the estimated cost is above this (USD). Default 5. |
min_reviews | integer | Ignore places with fewer reviews (default 20) |
pick | string | Which leads (default lowest_rated) |
place_ids | array | Enrich exactly these places instead of picking |
top_n | integer | How many leads (default 20) |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
site_selection Site selection with busyness data
Compare candidate locations for a new business: for each candidate address, the nearby competitors of that kind, their distance, rating, and Google popular times (hourly busyness 0-100, typical visit length). Returns competitor counts by radius, a saturation index, busiest slots and competitors shared between candidates. About $0.17 per candidate, 3-5 min.
| Parameter | Type | Description |
|---|---|---|
candidates * | array | Candidate addresses (or place names) |
category * | string | The kind of business, e.g. 'gym', 'coffee shop' |
include_curve | boolean | Include the hour-by-hour busyness curve per candidate (verbose) |
language | string | |
max_cost_usd | number | Refuse to start if the estimated cost is above this (USD). Default 5. |
radius_km | number | Trade area radius around each candidate (default 3) |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
wider | boolean | Read 40 places from the wider search instead of 20 (more cost) |
walk_times Walking times to nearest competitors
For a finished site_selection job: walking (or driving/cycling) times from each candidate to its nearest competitors, one route per pair. About $0.006 per route.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | A finished site_selection job |
max_cost_usd | number | Refuse to start if the estimated cost is above this (USD). Default 5. |
nearest | integer | Competitors per candidate (default 4) |
travel_mode | string | Default walking |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
review_responses Review response tracking
Who answers their customers: for a list of places (Maps URLs, place ids or 'name + city'), or a search, read the newest reviews and report reply rate, reply rate on low ratings, response-time buckets, and the lowest-rated unanswered reviews to escalate. About $0.05 per location at 100 reviews.
| Parameter | Type | Description |
|---|---|---|
language | string | |
location | string | … in this area |
low_stars | integer | Ratings at or below this count as low (default 3) |
max_cost_usd | number | Refuse to start if the estimated cost is above this (USD). Default 5. |
max_places | integer | For a search (default 10) |
places | array | Google Maps URLs, place ids (0x…:0x…) or names with city |
query | string | Or: a search (e.g. a brand name) … |
reviews_per_place | integer | Newest reviews per place (default 100) |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
job_status Job status and results
Status of a job; when its runs have finished, the job's analysis. Waits up to wait_s seconds for running jobs.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
wait_s | integer | Seconds to wait for the runs before returning a job id (default 45). |
find_places Find places in a job's data
Filter the places a finished job collected: text, category, rating, reviews, website/phone, open at a time of day, distance from a point. Free (no new runs). Use it to answer questions like 'late-night dentists near downtown', then alternatives() for similar places.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
category | string | |
has_phone | boolean | |
has_website | boolean | |
limit | integer | Default 20 |
max_rating | number | |
min_rating | number | |
min_reviews | integer | |
near | object | |
open_at | string | 24h time, e.g. '21:00' |
open_days | array | Days for open_at, e.g. ['friday'] (default any day) |
sort | string | |
text | string | Substring of name, category or address |
alternatives Alternatives to a place (graph neighbours)
Places connected to one place along 'People also search for' edges in a finished competitor_graph or enrich_leads job: the places customers consider instead. hops=2 widens the circle. Free.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
place_id * | string | A place_id from the job's results |
hops | integer | Default 1 |
limit | integer | Default 15 |
match_entities Match CRM rows to places
Join your own records (CRM, registry) to the places a finished job collected, on place id, phone, website domain, street address and name. Shared phones/domains (practices, chains) are flagged as ambiguous instead of guessed. Free.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
rows * | array |
export_graph Export the PAS graph
Export a finished competitor_graph or enrich_leads job's graph: json (nodes/edges), graphml (Gephi, yEd), cypher (paste into Neo4j Browser or cypher-shell), mermaid (small graphs). Nodes carry their community (same ids as competitor_graph). focus_place_id exports one place's neighbourhood only, e.g. a mermaid diagram of a shop and its competitors. Free.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
job_id * | string | |
focus_hops | integer | Neighbourhood size for focus_place_id (default 1) |
focus_place_id | string | Only this place and its neighbours |
include_off_category | boolean | Default: the job's setting (false) |