My Business
1.6K members online now
1.6K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Limit on records returned with batchGet in GMB API

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

We have several business accounts that range in the number of locations included (as few as 8 and some with 5,000+). Is there a limit to the number of records returned with a batchGet for each account? Currently we are not receiving all locations only 100 max per account. If there is a limit I need to know how we can get all locations in an account with a single batchGet call.

 

Thanks!

2 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Amanda S
May

Re: Limit on records returned with batchGet in GMB API

Google Employee
# 2
Google Employee

Hi @Amanda S,

 

I’ll get back to you about the maximum number of locations in a collection you can retrieve when sending the POST request to the :batchGet endpoint.

 

For now, please learn how to send a GET request to listing all paginated locations for the specified account. Please note that the maximum page size is 100 when listing locations for the specified account via the Google My Business API. You should add the pageSize and pageToken query parameters to the GET request for listing all locations under the specified account if the total number of locations exceeds 100 for that account. Please make sure that the pageToken is set to the nextPageToken field value returned by a preceding call to list locations when there were more locations than could fit in the requested page size.

 

Please also make sure that you provide a consistent pageSize query parameter in the GET request for listing locations because the pageSize determines the number of pages for your total results. Notice that the pageSize query parameter has a default value 100, a minimum value 1, and a maximum value 100.

 

You can check out this Accepted Solution for listing locations and including the pageSize and pageToken query parameters with the C# client library, as well as this Accepted Solution for listing all paginated locations by including the pageSize and pageToken query parameters with the PHP client library.

 

Thanks,

Terry

Limit on records returned with batchGet in GMB API

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I also want to know the limit of each post request..

Re: Limit on records returned with batchGet in GMB API

Google Employee
# 4
Google Employee

Hi @Prashant U,

 

We suggest you check out the Usage Limits for post request when using the Google My Business API.

 

Thanks,

The Google My Business API team

Limit on records returned with batchGet in GMB API

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Can you please tell me what is RedirectURI?

and what is important in locations:batchget api?

I am using this api to get all locations associated to a account with Oauth protocal.

 

credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "****************************",
ClientSecret = "*******************"
},
new[] { DriveService.Scope.Drive },
"user" ,
CancellationToken.None ,
new FileDataStore(folder,true)).Result;

 

But the application hangs while running. It does not responds any more results.

Re: Limit on records returned with batchGet in GMB API

Google Employee
# 6
Google Employee

Hi @Prashant U,

 

If you are using the OAuth 2.0 Playground to experiment with the Google My Business API, you need to add https://developers.google.com/oauthplayground as a valid redirect URI in the Google Developers Console as specified on the documentation page.

 

The batchGet method provides all the specified locations for the given account in the Google My Business API. Judging from your email address on this board, your company may not have a whitelisted project to access the Google My Business API. So before you use any Google My Business API, you need to have a whitelisted project to access them. You can check out the Prerequisites page of our documentation website to learn more about requesting access to the API.

 

Thanks,

Shalini, Google My Business API team

Limit on records returned with batchGet in GMB API

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hi Shalini,

Thanks for your support and answer to my queries.

I have a client with different google account with Google My Business API and I will suggest him to follow your answer for the same.

Right now I just go through your suggested guidelines and try to understand specifications required for locations:batchget API

Limit on records returned with batchGet in GMB API

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

for locations:batchget api which one api in the playground should I authorize?

Re: Limit on records returned with batchGet in GMB API

Google Employee
# 9
Google Employee

Hi @Prashant U,

 

You will need access to the Google My Business API for using batchGet method to get all the specified locations for your account.

 

Thanks,

Shalini, Google My Business API team