How to restrict Google Places web service to UK only?
<p>I am using the Google Places Web Service API to roll my own autocomplete functionality.</p>

<p><a href="https://developers.google.com/places/web-service/autocomplete" rel="nofollow noreferrer">https://developers.google.com/places/web-service/autocomplete</a></p>

<p>I'm using JS to fetch a server-side request that I make using PHP.</p>

<pre><code>&lt;?php

header('Content-Type: application/json; charset=utf-8');

$api = 'https://maps.googleapis.com/maps/api/place/autocomplete/json';
$key = 'api-key-goes-here'; // Use your own API key here.
$input = 'London'; // A hard-coded example.
$requestPath = "{$api}?&amp;key={$key}&amp;input={$input}";

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL =&gt; $requestPath,
  CURLOPT_RETURNTRANSFER =&gt; true,
  CURLOPT_ENCODING =&gt; "",
  CURLOPT_MAXREDIRS =&gt; 10,
  CURLOPT_TIMEOUT =&gt; 30,
  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =&gt; "GET",
  CURLOPT_HTTPHEADER =&gt; array(
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

$data = ($err) ? $err : $response;
echo $data;

?&gt;
</code></pre>

<p>All this works great and I get back a correct JSON response.</p>

<p>However, I am getting results from a global search, when Ideally I'd like to restrict it to UK / GB only.</p>

<p>For example, in the above code, the search for 'London' returns a London in Canada and elsewhere. How can I restrict this? I don't see anything mentioned in the documentation about being able to do this.</p>

<p>Many thanks for your help!</p>