APIs in any platform can use an unrestricted API key. However, you have the option to add a restriction to the API key. Once restricted, the key will only work on platforms that support that type of restriction.
To add restrictions for an API key, do the following:
- Go to the Google Cloud Platform Console.
- From the Project drop-down menu, select the project that contains the API key you want to secure.
- From the Navigation menu, select APIs & Services > Credentials.
- On the Credentials page, click the name of the API key that you want to secure.
- On the API key page, under Key restrictions, set the Application restrictions.
- Select HTTP referrers (web sites).
- Add the referrers (follow the instructions).
- Click Save.
For more information check Google Documentation