Authentication

Introduction

Foursquare Targeting API calls are made by passing your API key into the KEY (case-sensitive) parameter, and making your requests through https:

https://api.targeting.foursquare.com/categories?KEY=your_API_key

You should restrict IP addresses that are authorized to make API calls using your key (server-side), or restrict access by Bundle Id (iOS).

The key manager page.

The key manager page.

⚠️

Warning:

If you do not bind your key to an IP address or Bundle Id, you may be responsible for any unauthorized access to your API key.

Note: Android and client-side (Javascript/browser) access to the Foursquare Targeting APIs is currently unavailable.

Tracking Throttle Allocation (Real-time)

Every API response includes the remaining throttle allocation for the specified API key in the X-Factual-Throttle-Allocation HTTP header.

Example:

X-Factual-Throttle-Allocation:{"burst":"0%","daily":"0%"}

Notes:

  • The Foursquare Targeting API has a request per minute (RPM) limit as well as a request per day (RPD) limit.
  • Exceeding the request per minute (RPM) limit will result in a short delay in processing each request rather than denying requests. The delay will, in aggregate, result in your request volume to be no greater than the RPM limit.
  • Exceeding the request per day (RPD) limit will result in a HTTP 429 response.
  • RPD and RPM are calculated by per individual request method.
  • RPD and RPM are calculated based on rolling 24 hour and 1 minute periods.