Authentication

The Places API uses API Keys to authenticate requests.

Authenticating against the API is done by passing your API Key through an Authorization: header parameter (see example headers).
Endpoint Authentication

curl --request GET \
     --url https://api.foursquare.com/v3/places/search \
     --header 'Accept: application/json' \
     --header 'Authorization: 12345'
import requests

url = "https://api.foursquare.com/v3/places/search"

headers = {
    "Accept": "application/json",
    "Authorization": "12345"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.foursquare.com/v3/places/search', [
  'headers' => [
    'Accept' => 'application/json',
    'Authorization' => '12345',
  ],
]);

echo $response->getBody();

Learn how to Manage API Keys.