Skip to content

Google Maps

Why is my Google Place ID undefined?

Short answer

The label undefined does not identify one failure. Inspect the raw response first: Google's Text Search (New) documentation describes search results in places, the standalone Place ID in places[].id, and the required places.id field mask; Google's Place IDs documentation identifies the New API id as the standalone Place 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, following Google's Places API identifier documentation and Business Profile Location reference.

By Sergey Sulimko, Founder · 2 sources, read Nov 12, 2026

See which rivals beat you on Google Maps, and on what.

Type your business name. In about a minute: your Visibility Score, the rivals ranked around you and the first thing to fix.

Your scoreYou vs rivalsYour fix plan

Free, with no signup

What should I check first in the raw response?

For Text Search (New), request places.id in the field mask and read the Place ID from places[].id. Google's Text Search (New) documentation shows a top-level places array and says the API has no default field list. It also says an omitted field mask returns an error (Text Search documentation). Send the mask with $fields, fields, or X-Goog-FieldMask, as the Text Search documentation describes. For a Text Search (New) request that returns only place IDs, Google bills it under the Places API Text Search Essentials (IDs Only) SKU, as its Place IDs documentation says5.

Check the request and response in this order:

  1. Save the raw JSON before your application mapper changes it.
  2. For Place Details (New), request and read id.
  3. Treat name separately. In Places API (New), name contains the resource name places/PLACE_ID, while the standalone Place ID is 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, as the Place IDs documentation describes the New and Legacy identifiers separately.
  5. If the raw JSON contains the ID but your application variable is still undefined, trace the mapping code between the response and that variable.
Read the full answer

For an AI-agent or LLM-app lookup, use the Maps Tools Resolution API REST methods resolveNames or resolveMapsUrls. The Maps Experience agent tools MCP server provides resolve_names and resolve_maps_urls. For a specific place name or address, use REST resolveNames or MCP resolve_names; generic category searches and chain names without a location are unsupported and may fail (Resolution API guidance). For URL lookup, use REST resolveMapsUrls or MCP resolve_maps_urls with a structurally valid Google Maps URL that points to one unique place (Resolution API guidance). General query-based URLs are unsupported (Resolution API guidance). Both methods require a Google Cloud project with billing enabled and the Maps Experience agent tools API service enabled (Resolution API requirements).

The Resolution API uses different response paths from Text Search: resolveNames returns the place at results[].entity.place, while resolveMapsUrls returns it at entities[].place (Google's examples). The place value is a resource name in the form places/<Place ID> (Maps Tools Resolution API). A failed item may be an empty object; check failedRequests for its input index and error (Resolution API failure details).

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.

Read the full answer

Save the request body with the response. Check the exact textQuery, field mask, locationBias, and locationRestriction in the Text Search (New) request. 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?

In Place Details (Legacy), INVALID_REQUEST means the request was malformed, while NOT_FOUND means the referenced location and Place ID were not found in the Places database. Google's Place IDs documentation says truncation or other modification of an ID can produce INVALID_REQUEST. Its Place Details (Legacy) documentation distinguishes ZERO_RESULTS: the reference was valid but no longer refers to a valid result, which may happen if the establishment is no longer in business.4

Response What to check Minimal fix
INVALID_REQUEST Compare the received value byte-for-byte with the original stored value; Google says truncation or modification can produce this error. 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.
Read the full answer

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
Read the full answer

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 Maps Search URL 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 lets you check whether the ID resolves to that place in the Maps URL flow. It does not verify that a Google Account is authorized to manage the Business Profile; editing a profile requires the linked Google Account.

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. For the broader Maps surface, use the Google Maps hub.

Maps Agent service

Where your profile stands now

Visibility Score 0-100 · 20 scored factors · free · no signup

Profile Completeness
11 checks · 40% of score
Performance
4 checks · 35% of score
Competitive Position
5 metrics · 25% of score
Check my business

All sources on this page · 2

  1. 4
    Place Details (Legacy)Google Maps Platform · last updated 2026‑11‑09, read Nov 12, 2026
  2. 5
    Place IDsGoogle Maps Platform · last updated 2026‑11‑09, read Nov 12, 2026