Is it possible to see what domains are using a Google API Key?

Viewed 499

I've had a major spike in my Google API usage. Because many of my sites share the same key, I was hoping to see a sorted list of where the API calls are coming from. I haven't managed to find how to do that in the Google API Console. I know that you can restrict the keys to specific domains, but that's not realistic with hundreds of domains.

In the mean time I've regenerated the keys and deployed them in case they've been co-opted by someone else. If anyone has any insight, I'd really appreciate it. Thanks.

2 Answers

You can do this for all future requests but not for past ones. Google recently implemented a channel parameter in requests. You can add a different channel (from 0 to 999) to your requests from different URLs and then filter your billing reports on that channel to see exactly what you are looking for in your billing report moving forward. https://developers.google.com/maps/reporting/gmp-reporting#usage-tracking-per-channel

Is it possible to see what domains are using a Google API Key?

No its not.

If you want to know where the calls are coming from i would make project for each domain and then create a key. This will mean monitoring 100 google projects and creating billing accounts for each. I dont really see any other way around it though.

Related