title: Google places: Use multiple types
body: <p>This question is an update to some outdated questions:</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/13233196/google-places-auto-complete">Google Places Auto-Complete</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/31625112/google-places-api-how-to-use-multiple-types?noredirect=1&amp;lq=1">Google Places API: How to use multiple types?</a></p></li>
  </ul>
  
  <hr>
  
  <p>Because I need a way to get all near <strong>restaurants</strong>, <strong>stores</strong>, and <strong>churches</strong> I thought Google Places API seemed to do what I want, but I am having some trouble with filtering: I want to search for multiple <strong>places-types</strong> in one request.</p>
  
  <pre><code>let url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?"
  url += "location=" + 79.999 + "," + 8.999
  url += "radius=" + 2000
  url += "type=" + mytype// ??
  url += "key=" + mykey
  </code></pre>
  
  <p>This is what my url should look like. But I got trouble setting multiple types like:</p>
  
  <p>Setting <code>mytype</code> to maybe "restaurant" is working quite fine.   </p>
  
  <p>Setting <code>mytype</code> to "restaurant,store,church" is not working.</p>
  
  <p>Setting <code>mytype</code> to "[restaurant,store,church]" is also not working.</p>
  
  <hr>
  
  <p>I know that the feature searching for <strong>multiple place types</strong> was disabled by Google a long time ago. But using the javascript API works absolutely fine with multiple types so the URL request probably should also work this way.</p>