All endpoints
Facebook Search Locations

Facebook Search Locations API

Resolve a place name (city, region, or country) to Facebook location IDs. Use a returned id as the location_id filter on Search Posts to scope post results to a place.

Price: $0.004 per request
Free tier: 50 requests/month
Endpoint
GET /v1/facebook/locations

Parameters

query *
Place name to resolve, e.g. "London" or "Paris, France" (max 500 characters)

Response fields

results
Array of matching locations
id
Facebook location ID — pass to Search Posts as location_id
label
Human-readable location name (use to disambiguate matches)
timezone
IANA timezone of the location
count
Number of locations returned

Example Request

curl "https://apidirect.io/v1/facebook/locations?query=London" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "results": [
    {
      "id": "106078429431815",
      "label": "London, United Kingdom",
      "timezone": "Europe/London"
    },
    {
      "id": "107624535933778",
      "label": "London, Ontario",
      "timezone": "America/Toronto"
    },
    {
      "id": "108364785855057",
      "label": "London, Kentucky",
      "timezone": "America/New_York"
    }
  ],
  "count": 3
}

Frequently asked questions

How do I use a location ID to filter posts?

Call this endpoint with a place name, pick the result you want, and pass its id to the Search Posts endpoint as the location_id parameter to scope that search to the location.

Why are there multiple results for one place?

Place names are often ambiguous (for example, London, UK vs London, Ontario). Use the label field to choose the right match, or add a country or region to your query to narrow results.

Does the location filter guarantee every post is from that place?

No. Location filtering biases results toward the chosen place rather than applying a strict geofence, so an occasional out-of-area post may still appear.

How does pricing work?

You only pay for successful requests. The Facebook Search Locations API costs $0.004 per request. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 3 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the Facebook Search Locations API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key