Querying for devices based on location is disclosed. A request to send a push notification to a location is received. One or more bucket indexes to search for the presence of a device identifier are determined. The one or more bucket indexes are searched for the presence of the device identifier. One or more device identifiers are received in response to the search. The push notification is sent to one or more devices associated with the received one or more device identifiers.