Can I fetch all Facebook events in a specific city? All I need is event IDs nothing else. It should be all events (public), not only someone's events. Will Facebook let us fetch that info?
-
the website **http://www.allevents.in** has exactly what you are looking for. Has anyone any idea how they managed to do this? – Dieter Jan 29 '13 at 12:30
-
It works exactly the same way as elmcity. See here: http://stackoverflow.com/questions/11181480/how-can-i-query-public-facebook-events-by-location-city – cpilko Feb 02 '13 at 19:15
4 Answers
Elmcity does a simple search for a keyword in the event title. Try "Lancaster" for example. You'll get events in the UK, PA, NY OH and CA. You can also search for a non-location based word in the title like "picnic" and the script returns events.
You can try to query for events by location. With the graph API use the "Center" parameter in a search query:
https://graph.facebook.com/search?q=*&type=event¢er=37.76,-122.427&distance=1000
Run the query in FB explorer tool.
There is no way to query events via FQL by location.
The maximum distance is 50000 and is expressed in meters. There are limits to the number of records that are returned but you can use paging to retrieve further events.
As of writing this (Jun 2015), facebook silently ignores the center
parameter.
the source come from this post: Source Post
-
1The above queries will not return events. They are "place" queries, so you'll get things like local businesses, landmarks etc. Event queries by location have been deprecated since API 2.0 and there's currently no workaround. – Artur Bodera Jun 08 '15 at 09:53
You cannot query the event table without specifying an indexable column, i.e. an actual event Id. You could use the search functionality and query for event types, e.g.
http://graph.facebook.com/search?q=Dublin&type=event
http://graph.facebook.com/search?q=London&type=event
Once you get these results you could then further filter out these by timezone and location.

- 1,066
- 6
- 10
-
Events returned by these queries are not ordered. And there is no way to further filter them by creation date. – alexandru.topliceanu Dec 24 '13 at 18:22
While you can search for places or events near a place using the Facebook Graph API, I find this unreliable. Facebook does not expose standard categories to the API that allow you to filter on these, and there is no way that I am aware of to effectively search for venues that host events near an area and order them by relevance to what you are really looking for.
In practice, that means you can search for venues near a point. The Facebook API returns every coffee house that has an open mic night, but not an arena that hosts concerts.
Were I going to do this, I'd use this workflow:
- Query the Factual Places API to find the target venues for your search in the city of interest.
- Pass the result of that through the Factual Crosswalk API to get the Facebook IDs of those places, and concatenate them into an array.
- Use that array to query the Facebook Graph API for events at those places.

- 11,792
- 2
- 31
- 45
-
1This was made in September 2015 to do just that: https://github.com/tobilg/facebook-events-by-location – tim-phillips Nov 23 '16 at 01:00
Facebook search documentation implies that you can do a search for "objects" based on a location. For example you should be able to do https://graph.facebook.com/search?type=location&place=45386717890&distance=1000
to get a list of objects (including events) that are within 1000 (miles? km? they don't bother saying) of New York City (object #45386717890). However, I only ever get a blank result regardless of what I search near.
I'm guessing this feature is broken.

- 9,914
- 3
- 52
- 82
-
I just got this error while experimenting: "You are requesting too many tiles! Is your box too thin?" XD – Tim Tisdall Feb 01 '13 at 19:00
-
1today you would receive this: "message": "(#12) location search is deprecated for versions v2.0 and higher" – Augusto Oct 06 '14 at 17:06