Home » Android » android – Place Autocomplete Error while autocompleting: OVER_QUERY_LIMIT

android – Place Autocomplete Error while autocompleting: OVER_QUERY_LIMIT

Posted by: admin June 15, 2020 Leave a comment


When I try to search at Place Autocomplete I got Can’t Load Search Results
and the logs say

“Error while autocompleting: OVER_QUERY_LIMIT”

I have enabled https://console.cloud.google.com/
and API key works well.

enter image description here

Java Code

    String apiKey = "MY API KEY";
    private RadioGroup mRadioGroup;

    protected void onCreate(Bundle savedInstanceState) {
        // Obtain the SupportMapFragment and get notified when the map is ready to be used.
        mapFragment = (SupportMapFragment) getSupportFragmentManager()

        Places.initialize(getApplicationContext(), apiKey);

        PlacesClient placesClient = Places.createClient(this);
          // Initialize the AutocompleteSupportFragment.
        AutocompleteSupportFragment autocompleteFragment = (AutocompleteSupportFragment)

        // Specify the types of place data to return.
        autocompleteFragment.setPlaceFields(Arrays.asList(Place.Field.ID, Place.Field.NAME));

        // Set up a PlaceSelectionListener to handle the response.
        autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
            public void onPlaceSelected(Place place) {
                destination = place.getName().toString();
                destinationLatLng = place.getLatLng();

                Log.i(TAG, "Place: " + place.getName() + ", " + place.getId());

            public void onError(Status status) {
                Log.e(TAG, "onError: " + status);

XML Code


            android:layout_height="wrap_content" />

How to&Answers:

You are getting OVER_QUERY_LIMIT message because you have not enabled billing for your project in developers console.

To use the Places SDK for Android, you must include an API key with all API requests and you must enable billing on each of your projects.

Check this link for more info and pricing.

SKU: Basic Data

Fields in the Basic category are included in the base cost of the Places request, and do not result in any additional charge. The Basic Data SKU is triggered when any of these fields are requested: ADDRESS, ID, LAT_LNG, NAME, OPENING_HOURS, PHOTO_METADATAS, PLUS_CODE, TYPES, USER_RATINGS_TOTAL, VIEWPORT.

You can check pricing and other SKUs in the same link given above.


OVER_QUERY_LIMIT indicates that you are over your quota.
The main reason is:

If you exceed the usage limits you will get an OVER_QUERY_LIMIT status code as a response.

This means that the web service will stop providing normal responses and switch to returning only status code OVER_QUERY_LIMIT until more usage is allowed again. This can happen:

  1. Within a few seconds, if the error was received because your application sent too many requests per second.
  2. Within the next 24 hours, if the error was received because your application sent too many requests per day. The daily quotas are reset at midnight, Pacific Time.

You can also check this for more details: https://developers.google.com/maps/premium/previous-licenses/articles/usage-limits


You will receive an PLACES_API_RATE_LIMIT_EXCEEDED error if you are using the now deprecated Play Services version of the Places SDK com.google.android.gms:play-services-places as explained here:

Notice: If your Android app is experiencing 9005 PLACES_API_RATE_LIMIT_EXCEEDED errors, you may be using a deprecated version of the Places SDK for Android. The Google Play Services version of the Places SDK for Android (for example com.google.android.gms:play-services- places) was deprecated as of January 29, 2019, and was turned off on July 29, 2019. A new version of the Places SDK for Android is now available. We recommend updating to the new version as soon as possible. For details, see the migration guide.

You must replace the following line in your build.gradle:

implementation 'com.google.android.gms:play-services-places:<VERSION>'


implementation 'com.google.android.libraries.places:places:2.2.0'

Note that version 2 or greater requires androidx. At the time of writing the latest version that does not required androidx is 1.1.0.