Match your locations
Bring your own list of stores or sites and match them to Pine59's location identifiers so you can query our data using your IDs.
Most of the value of our data comes from joining it to locations you already care about: your stores, your sites, a competitor set from a broker, a lease pipeline, every outlet of a category in a market. Every metric is keyed on a location identifier, so that join runs on the identifier. This guide covers the identifiers we use, the three ways into them, the tools each one uses, and what to do with the records that will not match.
1. Identifier types
Every record carries a location_id. What it holds depends on the location type:
| Location type | Identifier | Example | Where it appears (US) | Public reference |
|---|---|---|---|---|
| Place | Placekey | zzw-222@8sz-ty2-kj9 | visitation_usa_places metrics and its places directory | Placekey design, FAQ |
| Area | Census block group GEOID (FIPS), 12 digits | 480291720051 | neighborhood_visitation metrics; the block group a place sits in; trade area origins | Census GEOIDs |
| Area | ZIP code, 5 digits | 78253 | ZIP-grain trade area origins |
Outside the US, each dataset page describes its location_id (grid cells, statistical areas, place ids).
Placekeys
A Placekey reads as what@where. The part after the @ is a hexagonal cell of roughly 15,000 m² that the place sits in. The part before it encodes the address, and for a point of interest, the place at that address. Placekeys are an open standard, so a list from another source may already carry them, and the free Placekey API assigns them to addresses.
Treat a Placekey as an opaque key and match on the whole string. Its parts are not a reliable shortcut to "same address" or "same building": at 12125 Alamo Ranch Pkwy in San Antonio, the directory holds the H-E-B store (zzw-222@8sz-ty2-kj9), its pharmacy (222-223@8sz-ty2-pjv) and its fuel station (222-22h@8sz-ty2-pjv). The store and its pharmacy share neither the address part nor the cell.
Census GEOIDs
Area identifiers in the US are Census GEOIDs, built from FIPS codes that nest by prefix:
| Level | Digits | Example |
|---|---|---|
| State | 2 | 48 (Texas) |
| County | 5 | 48029 (Bexar County) |
| Tract | 11 | 48029172005 |
| Block group | 12 | 480291720051 |
- Roll up by prefix. The first 5 digits of a block group are its county, the first 11 its tract. No lookup table is needed to aggregate.
- Keep them as strings. Alabama through Connecticut start with
0(California is06). A spreadsheet that reads the column as numbers drops the zero, and the join silently loses those states. Zero-pad to the full length before joining.
Every place carries the block group it sits in (census_code), and trade area origins are block groups too, so the two families connect without spatial work: assigning places to neighborhoods is a filter, and trade areas join directly to Census tables such as the American Community Survey. ZIP codes are postal routes, not Census areas; to join ZIP-grain data to Census tables, go through a ZIP to ZCTA crosswalk.
2. Three ways in
Start from what you have:
| You have | You want | Route |
|---|---|---|
| Our identifiers (Placekeys, GEOIDs) | Their metrics | Filter on location_id with in. An identifier that does not resolve is usually a Placekey from another source or an older version of ours: the place may well be in the directory under another key, so match it by address before treating it as absent. |
| A set of criteria | Every location that meets them: all Walmarts in the Austin metro, every gas station inside a box | Filter the directory on its attributes and geography (section 4). The result is your list. |
| Your own list, without our identifiers | The same locations in our data | Match each record on whatever it carries: address, brand, name, coordinates, category (sections 5 to 8). This is the hard path, and the rest of this guide is mostly about it. |
Scale changes the mechanics, not the route. For tens of records, query the directory record by record. For hundreds, batch records into in filters, one query per postal code or city. For thousands and up, export the directory for the states or metros you need once and match locally: one export costs far less than a query per record, and it allows matching that filters cannot express, such as normalized keys, string similarity and distance.
3. The tools
The places directory (visitation_usa_places.places in the US) holds one record per place. The fields that matter for matching:
| Field | Holds |
|---|---|
location_id | The place's Placekey. |
location_name | The name of the place, as on the sign. |
brands | The chain the place belongs to, when it is one; empty for independents. |
top_category, sub_category, naics_code | The place's NAICS industry: the 4-digit label, the 6-digit label, and the code itself. |
street_address, city, region, postal_code | The postal address. |
latitude, longitude | The place's point. |
parent_placekey | The larger place it sits inside (a mall, an airport), when there is one. |
us_state, us_county, us_cbsa, census_code | Its state, county and metro by name, and its block group GEOID. |
Signed in, the console shows the full places schema. Three endpoints work on the directory, each with a different kind of match:
| Endpoint | Match type | Use it for |
|---|---|---|
runQuery | Exact. Filters take ==, in and not in; values must match case and spelling. filterLogic combines filters with OR, e.g. ($0 OR $1) AND $2. options.boundingBox and options.polygon keep places whose point falls inside. | Pulling records once you know the directory's spelling; criteria sets; everything inside an area. |
searchFieldValues | Loose. Returns the distinct values of one field that contain the term, case-insensitive, and can be scoped by filters. It returns values, not records, and does not forgive typos. | Finding how the directory spells an address, brand, city or metro before an exact query. |
Export (/v3/exports) | None by itself: a slice of the directory as parquet. | Local matching at scale, with any rule you like. |
What the value search does and does not catch, on San Antonio's Floyd Curl Dr:
| Term | Values returned |
|---|---|
Floyd Curl (scoped to postal code 78229) | 8300 Floyd Curl Dr Ste 105, 7703 Floyd Curl Dr, 7700 Floyd Curl Dr |
8300 floyd curl | 8300 Floyd Curl Dr Ste 105 |
Floyd Curl Drive | none |
Flloyd Curl | none |
Coordinates take exact values only, so proximity runs through a bounding box or polygon, or locally on an export.
To get a feel for the directory before matching, the places map in the console browses coverage with filters and counts locations by any field. The same counts come from the API: a runQuery grouped by the field, with location_id aggregated as COUNT_DISTINCT. The Austin metro, for example, holds about 27,800 places across 65 top-level categories (directory as of November 2026).
4. Locations by criteria
A criteria set is an exact query on the directory. All Walmarts in the Austin metro:
{"filters": [
{"fieldName": "brands", "operator": "==", "value": "Walmart"},
{"fieldName": "us_cbsa", "operator": "==", "value": "Austin-Round Rock-Georgetown, TX Metro Area"}
]}
Every gas station with a convenience store inside a box over central Austin:
{"filters": [
{"fieldName": "sub_category", "operator": "==", "value": "Gasoline Stations with Convenience Stores"}
],
"options": {"boundingBox": {"minLng": -97.76, "minLat": 30.25, "maxLng": -97.72, "maxLat": 30.29}}}
The first returns 21 stores and the second 21 stations (directory as of November 2026). Each value comes from a value search, not from memory: the metro is named Austin-Round Rock-Georgetown, not the newer Census name Austin-Round Rock-San Marcos, and Walmart is one of eight Walmart brand values (section 6). Build competitor and category sets from exact brand and category values, never from name patterns, and audit a sample in each market.
5. Matching your own list
Matching runs in passes, and stops for each record at the first pass that resolves it:
- Exact address.
runQuerywith street address plus postal code. Prefer the postal code over the city (section 6). - Directory spelling. Most misses are formatting: a suite number, a directional, an abbreviation. A value search on the street address, scoped to the postal code, returns the directory's spelling to re-run pass 1 with. Locally, a normalized key does the same: street number, first street word and postal code, with suites, directionals and punctuation stripped from both sides.
- Nearby. Where the address still fails (a renamed road, a corner lot listed on the cross street, a mall address), search around where the location should be. With coordinates, pull every place inside a bounding box around the record's point and rank the candidates by name and distance (section 8 has a script for it). Without coordinates, pull every record of the brand in the postal code or city, or geocode the address first. The box size is a parameter, not a truth: a few hundred meters suits stores in a dense area, more suits large-format and rural sites, where the place's point can sit at the center of a large lot.
Coordinates are often the strongest signal a list carries. An address can be spelled ten ways; a point a few dozen meters from the place is unambiguous once names are compared.
An address usually returns more than one record: the store, its pharmacy, its fuel station, the tenants in the same building. Every pass ends with disambiguation: keep the record whose brand is the one your list means, or whose name overlaps your list's name. A store list means the store, not its pharmacy.
The worked example runs passes 1 and 2 in Python on four San Antonio addresses.
6. Field lessons
What the directory's fields hold, and the habit each one calls for:
location_namevs.brands. The name is what the sign says; the brand is the chain's normalized value. Every Walmart in the Austin metro is namedWalmart Supercenterand brandedWalmart. Banners are separate brand values: a value search forWalmartreturns eight (Walmart,Walmart Pharmacy,Walmart Fuel Station,Walmart Auto Care Center,Walmart Vision Center,Walmart Garden Center,Walmart Photo Center,Walmart Pet Services). Most independents carry no brand at all. Match chains on brand, independents on name plus address.- Addresses. The directory keeps suites inside the street address (
8300 Floyd Curl Dr Ste 105), uses abbreviations (Dr, notDrive), and spells highways several ways (N Interstate 35,Ih 10 W). Normalize both sides, or let the value search find the spelling. - Postal codes. Five-digit strings: trim ZIP+4 from your list, and keep the leading zero of New England and New Jersey codes. A postal code is a delivery route, so it can cross city and county lines.
- City. City values follow postal naming, which is not always the municipality: a store your list places in Sacramento can sit in West Sacramento. Prefer postal code, and use county or metro for area work.
- Metros and counties. Exact names, in the directory's vintage. Metro names follow the March 2020 delineations (OMB Bulletin 20-01), not the July 2023 revision (OMB Bulletin 23-01), which renamed metros whose principal cities changed: code 12420 is
Austin-Round Rock-Georgetown, TX Metro Areahere and Austin-Round Rock-San Marcos in current Census tables. Look names up with a value search rather than typing them, and when joining to Census data by metro, join on the code, not the name. - One address, many places. A supermarket's pharmacy and fuel station, a gas station's convenience store under its own brand, a building's tenants: each is its own record with its own identifier.
- Places inside places. Stores in a mall or shops in an airport carry a
parent_placekey, and large campuses such as zoos can hold their parts as separate places. Decide which level your list means. To get every tenant of a set of centers, filter on the parent instead of matching tenants one by one. - Names drift. A place can be tracked under a predecessor's name at the same address, or carry a misspelled name. Address matching recovers these; name matching never will.
- Categories are coarse for independents. A neighborhood grocer can be filed as a restaurant. Do not filter on category while matching a list; use it afterwards, as a check.
7. When there is no match
Before recording a miss, confirm it is one: search the street name alone within the postal code, the brand within the city, and a box around the coordinates. Misses that survive fall into a few kinds, each with its own next step:
| Why it did not match | What to do |
|---|---|
| Listed under another address: a cross street, the mall's address, a renumbered lot | Pass 3 finds most of these. Confirm on a map before accepting. |
| Listed under its parent: a counter inside a store, a kiosk in a mall, a shop in an airport | Decide whether the parent's data answers your question. Do not map the child to the parent silently. |
| Not in the directory: newly opened, very small, or a site rather than a business (a planned store, a parcel) | Read it at area level: the block group it sits in, or a custom area drawn around it. |
| Similar name, different place | Keep it unmatched. |
What is left stays unmatched in the mapping, with the reason. Forcing a record to the nearest place puts another place's visitors on your store number.
8. Checking the match
- Match rate by segment. National chains in established locations match almost completely; misses cluster in the newest and smallest independents. Report the rate per segment (brand, region, format), so a gap is explained rather than averaged away.
- Verify by hand, ranked. Score every candidate, accept the clear matches, and review the rest by hand with a map alongside. A miss that turns out to be formatting is a rule to add to pass 2.
- Data in your window. A record in the directory does not guarantee metrics for every period: places open and close, and coverage can differ by region and period. For each matched identifier, check the first and last month with data against the window you need. Read the first month as the start of data, not as an opening date.
Ranking candidates for review
A small script makes the hand check fast. For each record on your list, it pulls every place in a box around the record's point, scores each candidate on name, address and distance, and prints them best first with a map link. Names are compared ignoring case and punctuation, so HEB matches H-E-B:
import math
import os
from difflib import SequenceMatcher
import requests
API = "https://api.pine59.com/v3/datasets"
HEADERS = {"Authorization": f"Bearer {os.environ['PINE59_API_KEY']}"}
def candidates(lat, lng, box_m=300):
"""Every place whose point falls in a box of box_m around the expected location."""
d_lat = box_m / 111_320
d_lng = box_m / (111_320 * math.cos(math.radians(lat)))
body = {
"fields": [{"name": f} for f in
["location_id", "location_name", "brands", "street_address",
"postal_code", "latitude", "longitude"]],
"options": {"boundingBox": {"minLng": lng - d_lng, "minLat": lat - d_lat,
"maxLng": lng + d_lng, "maxLat": lat + d_lat}},
"pageSize": 366,
}
r = requests.post(f"{API}/visitation_usa_places.places:runQuery", json=body, headers=HEADERS)
r.raise_for_status()
return [rec["fields"] for rec in r.json().get("records", [])]
def similarity(a, b):
"""0..1, ignoring case, spaces and punctuation ("HEB" == "H-E-B")."""
norm = lambda s: "".join(ch for ch in s.lower() if ch.isalnum())
return SequenceMatcher(None, norm(a), norm(b)).ratio()
def meters(lat1, lng1, lat2, lng2):
x = math.radians(lng2 - lng1) * math.cos(math.radians((lat1 + lat2) / 2))
return 6_371_000 * math.hypot(x, math.radians(lat2 - lat1))
def rank(record, box_m=300):
"""Score each candidate on name, address and distance; best first."""
rows = []
for c in candidates(record["lat"], record["lng"], box_m):
name = max(similarity(record["name"], c["location_name"]),
similarity(record["name"], c.get("brands") or ""))
address = similarity(record["address"], c["street_address"])
dist = meters(record["lat"], record["lng"], float(c["latitude"]), float(c["longitude"]))
score = 0.5 * name + 0.3 * address + 0.2 * max(0, 1 - dist / box_m)
rows.append((round(score, 2), round(name, 2), round(address, 2), round(dist),
c["location_name"], c["street_address"], c["location_id"],
f"https://www.google.com/maps/search/?api=1&query={c['latitude']},{c['longitude']}"))
return sorted(rows, reverse=True)
store = {"name": "HEB", "address": "8300 Floyd Curl Drive",
"lat": 29.5148, "lng": -98.5821}
for row in rank(store)[:5]:
print(row)
| Score | Name | Address | Distance | Candidate |
|---|---|---|---|---|
| 0.90 | 1.00 | 0.82 | 74 m | H-E-B, 8300 Floyd Curl Dr Ste 105 (222-222@8sz-tfd-789) |
| 0.62 | 0.43 | 0.82 | 68 m | H-E-B Pharmacy, 8300 Floyd Curl Dr Ste 105 (222-223@8sz-tfd-789) |
How to read it: the store and its pharmacy share an address and almost a point; the name separates them. A clear winner (a high score with a wide gap to the next candidate) can be accepted as it stands. Close calls, low top scores and empty boxes go to review: open the map links next to a street-level view, and decide. The weights and the box size are parameters; tune them on a few records you know before running the list. A box in a dense downtown can hold more than one page (366 records): shrink it rather than paging.
9. Keeping the mapping
Store the mapping as a table of your identifier against location_id, with the pass that produced each match, the match key, and the date. Two rules keep it sound:
- Re-verify on a cadence. Identifiers change: places open, close, move, get a better geocode, or are merged with a duplicate, and any of these can produce a new Placekey. Re-run the exact pass every quarter, and re-match whatever no longer resolves.
- Match once, join everywhere. Every place metric carries the same
location_id, so one mapping serves foot traffic, trade areas, visitor profiles, and journeys alike.
Once a list is mapped, the natural next step is a store profile of any location on it, or a brand comparison across the set.
Examples
Related guides

Brand Comparison
Compare brands with aggregated location intelligence (scale, typical store performance, and development over time) in support of competitive intelligence and market understanding.

Store Profiling
Build a complete picture of a single location: visit volume against the chain and category, weekly rhythm, who visits, and where they come from.

Void Analysis
Find what a market lacks: compare an area's measured demand against references such as analog areas, competitor networks, or your own stores, then validate each gap with real movement.