When serving your HTTP request, Google needs a way to connect that HTTP request to your account (for monitoring and billing purposes). The identifying piece of information is the API key, which must be present in every submitted HTTP request.
To generate an API key, on the Google Developers Console main screen, go to the Credentials tab.
On the Credentials screen, click the Create credentials button
A dropdown listing the type of credentials will appear.
Select API key
An API key will be generated for you.
You can access the current API key at any time from the Credentials tab: