Skip to content

google-maps

Why is my Google Place ID undefined?

By Sergey Sulimko, Founder

The label undefined does not identify one failure. Inspect the raw response first: Places API (New) search results are in places, the standalone Place ID is in places[].id, and the response field mask must request places.id. An empty places array means that search returned no candidate. If an ID was returned but later fails, test the original value for truncation or obsolescence. Keep a New API id, a legacy place_id, a Business Profile locations/{locationId} resource, and a storeCode in separate fields.

What should I check first in the raw response?

A missing ID field is a response-shape or field-mask problem when the raw response has a place object but does not contain the ID field your code reads. Google's Text Search (New) documentation says that the response is a JSON object with a places array and that there is no default list of returned fields. The request must include a field mask, such as places.id, through $fields, fields, or X-Goog-FieldMask. Omitting the mask returns an error.

Check the request and response in this order:

  1. Save the raw JSON before your application mapper changes it.
  2. For Text Search (New), confirm that the top level contains places and request places.id in the field mask. For Place Details (New), request and read id.
  3. Treat name separately. In the New API, name contains the resource name places/PLACE_ID; the standalone Place ID is in id.
  4. If the client variable is called place_id, map it from the New API id only after the endpoint has been identified. Do not expect the New API to return the legacy field name.

What if the search returned no place?

An empty places array is a no-result branch, not an obsolete-ID branch, because the response supplied no place from which to read an ID; if places is absent, check first that the raw response is not an API error. Google's Text Search (New) documentation defines places as the array of matching places and says that identical requests are not guaranteed to return a consistent list.

Save the request body with the response. Check the exact textQuery, the field mask, and the locationBias or locationRestriction. Rerun the search with a more specific business name and a known area. Do not call an ID obsolete until a previous response actually returned an ID and a later Place Details or refresh request rejects it.

What do INVALID_REQUEST and NOT_FOUND mean for a Place ID?

INVALID_REQUEST points to an invalid or modified ID, while NOT_FOUND points to an ID that has become obsolete. Google's Place IDs documentation says truncation or other modification can produce INVALID_REQUEST. A place can become obsolete after closure, relocation, or an update to Google's Maps database, and the old ID can then return NOT_FOUND.

Response What to check Minimal fix
INVALID_REQUEST Compare the received value byte-for-byte with the original stored value. Restore the original if it was truncated or changed, then retry. Do not invent a maximum Place ID length.
NOT_FOUND Reissue the saved search or autocomplete request. Use the current ID returned by that request. In Place Details (New), also inspect movedPlace and movedPlaceId when those fields are requested.

Google says obsolete IDs may remain in autocomplete responses for a few days. Store the original request that produced each ID so you can refresh it. Google recommends refreshing stored Place IDs older than 12 months with a Place Details request that asks only for the ID field; the documentation says that refresh is at no charge. A reissued search used to replace an obsolete ID is billed at the appropriate SKU.

Which identifier am I actually holding?

A Place ID, a Business Profile location ID, and a store code can refer to the same business without being interchangeable identifiers. The Place ID glossary entry covers the Maps identifier. The neighboring Business Profile location ID answer covers the account-scoped API resource. Label the value by the field and endpoint that produced it:

Value or field Identifier family Use it for
places[].id or Place Details (New) id New Places API standalone Place ID Places API and Maps workflows
places[].name or Place Details (New) name New Places API resource name, places/PLACE_ID The resource-name form of the same place reference
Legacy request place_id or legacy response result.place_id Places API (Legacy) Place ID The legacy endpoint's request and response shape
locations/{locationId} Business Profile API Location resource An authorized Business Profile API workflow
storeCode Account-scoped external code The owner's spreadsheets and other records
Business Profile metadata.placeId Output-only Maps Place ID on a Location resource Connecting a Business Profile location to its Maps place when Google populates it

Google's Business Profile API Location reference identifies locations/{locationId} as the Location resource name, storeCode as an external identifier unique within an account, and the Maps Place ID as an output-only field. Do not pass a locationId or store code to a Places endpoint that expects id or place_id.

How can I verify that a Place ID points to the right business?

Use a Maps URL with both a human-readable query and query_place_id, then compare the displayed place with the business you intended. Google's Maps URLs documentation requires query for a Search action. When query and query_place_id are both present, Maps uses the text query only if it cannot find the Place ID.

Use a URL-encoded version of this shape:

https://www.google.com/maps/search/?api=1&query=PLACE_NAME&query_place_id=PLACE_ID

Check the displayed name and address against the intended business. This verifies the ID-to-place link. It does not verify that a Google Account is authorized to manage the Business Profile.

Does resolving a Place ID prove ownership or ranking?

No. Resolving a Place ID identifies or links a place for a Maps or Places workflow; it does not prove Business Profile access or a ranking position. Google’s Business Profile editing guidance says that showing a business on Google services requires adding or claiming it and then verifying the Business Profile, while editing requires the linked Google Account.

Google's local-ranking guidance separately says local results are mainly based on relevance, distance, and popularity, and that a business cannot request or pay for a better local ranking. A resolved ID is not an ownership credential and does not establish a ranking position. For the broader Maps surface, use the Google Maps hub.

See where your profile stands

The audit shows how this applies to your own profile: it reads a verified Google Business Profile and scores it the same way every month.

Visibility Score

0 to 100

20 scored factors across profile completeness, performance, competitive position. Free, no signup, on any verified Google Business Profile.

Run the free Visibility Score audit

No signup, no card. You get the score and the factors behind it.

Common questions

Is `undefined` the same as having no Google listing?
No. An empty `places` array means the search returned no candidate in that response. A place object with a missing `id` usually indicates a field-mask, response-shape, or mapper mismatch. Check the raw JSON before deciding which branch you have.
Should I read `id`, `name`, or `place_id`?
Read `id` for the standalone Place ID in Places API (New). Read `name` in that API as the resource name `places/PLACE_ID`. Read `place_id` only when the endpoint is the Places API (Legacy) response shape.
Can an old Place ID become invalid?
Yes. Google says a Place ID can become obsolete after a place closes, moves, or changes in Google's Maps database. Reissue the saved request to obtain the current ID, and refresh stored IDs older than 12 months through the documented Place Details path.

More on this subject in the answers library, and on the Maps Agent blog.

Last updated October 12, 2026. This page is maintained by the Maps Agent research team.