1CGoogle Maps Data Lab

Using Google Place IDs to Match Listings Across Exports

The second export is where a directory's data gets interesting. The first one you clean and publish. The second one, a few months later, has to be compared against what you already have, and the obvious way to match rows is by business name. That breaks quickly. Names change, owners add keywords, and two branches of the same chain share a name but sit in different towns.

Google place IDs are a steadier key. Most Google Maps exports include one for every row, and using it as the main join between old and new data makes refreshes faster and much less error prone. This note covers how place IDs work, where they let you down and a simple process for matching listings across exports.

What a place ID is

A place ID is a text string Google uses to identify a place in its Maps database. Every business listing has one. It looks like a long jumble of letters and numbers, and it means nothing to a human, which is exactly why it's useful as a key. It doesn't change when a business tweaks its name or adds a phone number.

Exports from Outscraper, Apify or any scraper usually carry the place ID in its own column, though the column name varies between tools. Before your first build, find that column and keep it. If you drop it during cleaning to tidy up the spreadsheet, you lose the easiest way to line up future exports.

Store the place ID alongside each listing in your own data, even if it never appears on the site. It takes seconds and saves hours later.

Where place IDs let you down

Place IDs are stable for most listings most of the time, but not forever. Google's developer documentation says a place ID can change over time and recommends refreshing stored IDs that are more than a year old. A listing can also be merged with another, removed after a business closes or replaced after a move.

In practice that means a match on place ID is strong evidence that two rows are the same business, and a missing match is only a prompt to look closer. When a place ID from your old data doesn't appear in the new export, the business might have closed, moved out of your search area, dropped out of the scraper's results for that query or simply received a new ID.

Treat unmatched rows as a review queue, not as automatic deletions.

A matching process for each refresh

Here is a process that works in a spreadsheet or a short script. It assumes you kept the place ID from your previous export.

  1. Run the new export with the same search terms and area as last time.
  2. Remove exact duplicate rows from the new export, keyed on place ID.
  3. Join the new export to your current data on place ID.
  4. Sort the results into three groups: matched, only in old data and only in new data.
  5. For matched rows, compare the fields you display and flag any that changed.
  6. For the two unmatched groups, review by name, address and phone before deciding anything.

The matched group is usually the large majority, and most of it needs no attention. The useful work happens in the changed fields and the two unmatched groups.

Reviewing the rows that don't match

For rows only in the old data, check the business status column if your export has one. Many exports include a flag for permanently or temporarily closed listings. If the business is still running but has a new place ID, you'll often find it in the "only in new" group with the same phone number or street address. Match those by hand, update the stored ID and carry over any edits you made earlier.

For rows only in the new data, decide whether each is a real new business or something your search terms picked up by accident. New exports often pull in a few businesses from neighboring categories. A query for auto repair might return a parts store or a car wash, and those don't belong in a mechanic directory.

Phone numbers are a good second key for this review. Format them the same way in both datasets before comparing, since one export might include a country code and the other might not.

For a closer look at the cleanup side, this guide to finding duplicate listings in a Google Maps export walks through catching the same business entered twice within one file.

Keeping your own edits safe

Directory owners often fix things by hand: a cleaner category, a corrected phone number, a removed listing the owner asked to take down. A naive refresh overwrites all of that with whatever the new export says.

Keep your manual edits in a separate column or file, keyed on place ID. After each refresh, apply them on top of the new data. Removal requests deserve their own list so a business you took down doesn't quietly return in the next export. When a place ID changes, update it in your edit list too, or the edit stops applying.

Questions about place IDs

Do I need the Google Places API to use place IDs?

No. The place ID comes in your export, and you can use it as a matching key in a spreadsheet without calling any API. The API matters only if you want to check or refresh IDs directly with Google.

What if my old data has no place IDs?

Match the first refresh by phone number and address, then keep the place IDs from the new export from then on. It's slower once, and easier after that.

How often should I check for changed place IDs?

Every refresh covers it, because unmatched rows show up on their own. If you refresh less than once a year, expect more unmatched rows and set aside extra review time.

For more on the tools and tech side of running a directory, see the technology notes for directory builders. 1 Click Directory Builder turns a Google Maps export into a complete directory site, so a clean, matched export goes straight into rebuilt pages.