Facebook Location Search API
Find Facebook places by name or postal code. Get the place ID and coordinates to find public events in a city.
Find the matching city by its name and description. Pass its id to facebook_events as location_id. If a postal area has no events, search by city name for nearby events.
API Parameters
Query
-
- Name
-
q - Required
- Required
- Description
-
Place name or postal code, up to 200 characters. A search with no matches returns an error and costs one credit.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
facebook_location_search.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Place Lookup
https://www.searchapi.io/api/v1/search?engine=facebook_location_search&q=Austin%2C+Texas
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "facebook_location_search",
"q": "Austin, Texas"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_c0FiNUQFigsSQkUwlARhrScp",
"status": "Success",
"created_at": "2026-11-24T21:42:48Z",
"request_time_taken": 1.19,
"parsing_time_taken": 0.0,
"total_time_taken": 1.19,
"request_url": "https://www.facebook.com/marketplace/",
"html_url": "https://www.searchapi.io/api/v1/searches/search_c0FiNUQFigsSQkUwlARhrScp.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_c0FiNUQFigsSQkUwlARhrScp"
},
"search_parameters": {
"engine": "facebook_location_search",
"q": "Austin, Texas"
},
"locations": [
{
"id": "106224666074625",
"name": "Austin, Texas",
"description": "City",
"city": "Austin",
"postal_code": "78701",
"latitude": 30.2677,
"longitude": -97.7475
},
{
"id": "111944028832853",
"name": "University of Texas-Austin",
"description": "University of Texas-Austin, TX ยท 42,293 people checked in here",
"city": "Austin",
"postal_code": "78712-1753",
"latitude": 30.284865,
"longitude": -97.733465
},
"..."
]
}