Skip to content

[Google Maps Places API] - Text Search missing next_page_token in response #5385

Description

@shaunmitchellve
  • which product (packages/*): packages/google-maps-places
  • OS: OSX
  • Node.js version: 21.7.2
  • npm version: 10.6.0
  • google-cloud-node version:Place2 1.6.0

Steps to reproduce

  • npm i @googlemap/places
const {PlacesClient} = require('@googlemaps/places').v1;

 let response = await placesClient.searchText(textQuery: 'something', {
 otherArgs: {
  headers: {
   'x-Goog-FieldMask': 'places.displayName',  
},}});

console.log(response);

/*
response:
[
  {
    places: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ],
    contextualContents: []
  },
  null,
  null
]

I would expect something like:
[
  {
    places: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ],
    contextualContents: [],
    nextPageToken: ''
  },
  null,
  null
]
*/

Metadata

Metadata

Assignees

Labels

size: mtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions