google api keys localhost restriction
Go to this address: https://console.developers.google.com/apis
Create new project and Create Credentials (API key)
Click on "Library"
Click on any API that you want
Click on "Enable"
Click on "Credentials" > "Edit Key"
Under "Application restrictions", select "HTTP referrers (web sites)"
Under "Website restrictions", Click on "ADD AN ITEM"
Type your website address (or "localhost", "127.0.0.1", "localhost:port" etc for local tests) in the text field and press ENTER to add it to the list
SAVE and Use your key in your project