title: How to restrict a Google API key to a single service?
body: <p>I've made a project in <a href="https://console.developers.google.com" rel="nofollow noreferrer">Google API Console</a>. The project uses 2 services: YouTube Data API and Google Maps JavaScript API. The first service is server-to-server so an API key is not exposed. The second service is client-to-server so an API key is exposed (sent to browser in an HTML code). If I use the same key both for the Maps API and the YouTube API, a user can take the key and use it to interact with YouTube behalf me (this is a problem).</p>
  
  <p>A solution is to use separate keys for the APIs. How can I get an API key which is allowed to use with the Maps API but not allowed to use with the YouTube API?</p>