Facebook Graph searching
The current state of play (updated Oct 2019)

Facebook's advanced Graph search was an amazingly useful tool for researchers, including those investigating extremism, fraud and war crimes. It went well beyond the limitations of the current search box and involved researchers composing special web addresses to make Facebook perform customised searches.

However, on the 6th June 2019, Facebook started taking measures to prevent people doing this. They started adding special codes (or tokens) to the end of the Graph search addresses.

For example, a search address for people who like BBC News used to be:


However this no longer works and all you get is this:


These days, the address looks a lot more complicated and unpredictable:


This makes Graph searching impossible for most investigators.

Workarounds have come and gone. FB Search, which uses a normal webpage interface for other Graph searches: https://sowdust.github.io/fb-search/

Copies are available at graph.tips/facebook.html and at intelx.io/tools?tab=facebook

As Facebook say they have only paused Graph I am leaving this page up of search language for reference. Hopefully they will come up with a brilliant advanced search that legitimate researchers can use.


Paul Myers, October 2019


Facebook Graph Search Operators

Collated by Paul Myers

updated June 2019 - currently, these don't work, but are included for reference


How to use Facebook Graph Search

(c) 2019 www.researchclinic.net



Basics, search prefixes and adjuncts


All Graph searches begin with this


used to combine two or more searches with a Boolean AND
(e.g. people who are named David AND come from Berlin)


used to combine two or more searches with a Boolean OR
(e.g. people who come from Berlin OR Frankfurt)


used before a keyword in a search (as opposed to a Facebook ID number)

/str/keyword/stories-keyword/ looks for words in a post
/str/name/users-named looks for a named user
/str/name/places-named looks for a named establishment
/pages/  find pages related to defined search
/photos/ specifies that it's the photos you want of a searched entity

Date Range


or to specify a page or account, try:


adds a year of post to the search
/month/year/date-2/events adds month (three letters) /year of post date
/day/month/year/date-3/stories/ adds dd/mon/year of post date



specifies past, present and ever as a requirement to a search

Back to top ↑



Facebook posts

/id/stories-commented posts commented on by someone
/stories-by posts by someone
/stories-tagged posts tagged with someone
/stories-liked posts liked by someone
/intersect combination search example
/str/keyword/stories-keyword/ looks for a word in a post

Photos & videos

id/photos-commented photos someone has commented on
/photos-by photos by someone
/photos-of photos of someone
/photos-tagged photos tagged with someone
/photos-in photos taken in a place
/str/keyword/photos-keyword looks for a word in the description
/videos-by the same searches work for videos



/id/events  (not currently working)

Future events someone is interested in attending
/events/year/date/events/ Events someone was interested in, during a given year or years

/events-joined/year/date/events/ (not currently working)

Events someone joined in a past year

/place id/events-at

/str/place name/pages-named/events

events near me or events near a place

App users

search/me/friends/124024574287414/app-users/intersect my friends who use Instagram

Back to top ↑



Pages liked


/str/page name or keyword/pages-named/likers/

people who like a Facebook page
/pages-liked pages someone likes
/pages-liked/interest/pages/ someone's special interests


/groups groups someone belongs to
closed/groups-privacy/code/groups/ private groups joined by a person
/str/group name/groups-named/members finds members of a named group
closed/groups-privacy/code/employees/groups/ (not currently working) private groups belonged to by employees of a company
/company-id/employees/place-id/residents/intersect/groups (not currently working) groups joined by employees of a company that live in a place

People, friends and followers

/me used for yourself instead of a code
/str/name/users-named specify a name to look for


full details on someone's friends (unless friends list is hidden)
code/friends/code/friends/intersect mutual friends of people
/friendship/username1/username2 (not currently working) another way of analysing two members' relationship
/friends/friends friends of friends (very vague on its own)
/followers lists someone's followers
/users-followed people someone follows
see also /boyfriends /girlfriends /children /husbands /aunts /uncles /sons /stepsons /brothers-in-law /daughters /siblings /grandparents /grandmothers /grandfathers  and /cousins. Add /friends to get their friends.
someone's family members

Back to top ↑



Personal connected places

/places-liked places liked by someone
/places-visited  Towns, cities and countries visited by someone

Towns, cities and places

/visitors people who have visited a place
/str/place name/pages-named/city/pages/intersect

to get the "official" code for a city, you may also want to search for "things to do in london" site:facebook.com on Google.

search for named city pages
/users/checked-in people who have "checked in" in a place

/str/place name/pages-named/residents/ever/

adds people who live or lived in a town, country or city
/residents-near residents near a place
/places-in lists establishments in a town
/users-birth-place people who were born in a specified place
/home-residents people whose home is in a specified place
/events-near events near a place

Language speakers


/speakers (not currently working)

people who speak a language

Back to top ↑




/employers lists companies that have employed someone
/employees lists colleagues of someone or employees of a company
/str/company name/pages-named/employees lists employees of a company of a specified name
/str/name/users-named/employers/ (not currently working) lists companies that employ someone of a specified name
/employer/pages/ companies with a specified name



code/job-liker-union/employees/ (not currently working)

lists people of a profession

Profession Codes (not currently working)

lawyers 112696438745118
Police officers 109396455744864
Investigators 143544082337251
Accountants 112926212054966
Managers 112892498724794
CEO's 112032368815466
Treasurers 112732928742174
Administrators 143418082353057
Actors 113227362021025
Teachers 108464855840777
Trainers 107738079249033
Architects 108031252558282
Civil engineers 131461013563090
Nurses 113599041983855
Social workers 103114063062534
Dentists 119880341359563
Optometrists 112544782094996
Models 106216656075289
Strippers 112231702136450
Sex workers 162282617128863
Librarians 112282248788333


Back to top ↑





visitors, possibly customers of an establishment
/likers people who like a page, place, establishment etc.
/places-liked businesses and establishments liked by someone
/str/name/places-named looks for a named establishment
/places-in lists establishments in a town


/schools-attended schools/universities attended by someone
/str/keyword/pages-named/students/ever/ find people who went to a college
date/date/students people who went to a specified school or university in a certain year
date/date/students-2/ used in intersected school searches
/school/pages/code/likers/schools-attended/ schools attended by people who like something
/students someone's classmates

Back to top ↑



Sexuality & relationships

/single/users/ (see also /married/users) search for single people


for gay men


for lesbians
both/users-interested/females/intersect for bisexual women

example - change genders to find straight women, bisexual men etc.

Religion and beliefs


/str/keyword/pages-named/users-religious-view (not currently working)

specify peoples' beliefs

Religion Codes (not currently working)

Protestants 106274162745013
Catholics 102144649827989
Muslims 106078429431815
Jewish people 115063718504722
Hindu 109107252447873
Buddhist 114761101868288
Shinto 112268618789811
Atheists 111235122235077
Satanists 109491989070706
Scientologists 103822469656893
Jehova's Witness 114897538527344
Jedi 108069459214854
Mormon 112325998784231
Vegan 263557043786425

Back to top ↑



Political views


/str/keyword/pages-named/users-political-view (not currently working)


specify peoples' political views
Politics codes (not currently working)
Conservatives 104082972962342
Socialists 103794206325342
Liberals 114494755234706
Islamic politics 109523995740640

Users' age

/age/users-older/ minimum age


/males gets only males in your search
/females gets only females in your search










Sites that make people, demographic and information research with Facebook easy. Enter a username and generate urls to perform Graph searches.

Back to top ↑




How to use Facebook Graph Search

Experienced researchers know that Facebook's search box has very limited and unpredictable functionality. However, there are tricks that can be used to squeeze a better search out of the world's most popular social network.

Graph Searching

By formulating a special web address, we can use Facebook's older "Graph" search and, with patience and imagination, we can use this to perform amazing searches.

These special search web addresses all begin with the prefix https://www.facebook.com/search/ and are followed by a combination of ID numbers and special "search operator" commands.

There are two main styles of Graph searching Facebook; a search with ID numbers and and a search with words (or "strings" in nerd-speak ).  Both have their strengths and weaknesses.

Searching with Facebook ID numbers

Searching with ID numbers is precise and will directly only on the person or page with a certain ID number.  You can use sites like findmyfbid.com and lookup-id.com to look up the ID associated with a Facebook account or page.

For example, Mark Zuckerberg's Facebook page is https://www.facebook.com/zuck.

When we look up the ID number of Zuck we see that it is the number 4.

A graph search for places visited by Mark will use this Facebook ID number and the search operator "places-visited". The search web address will look like this.



Searching with strings

Searching with strings is less precise than using Facebook ID numbers, but more flexible ("fuzzy" in nerd-speak).

A search for places visited by *anyone* named Mark will use the code "str" followed by the name and will look like this:



Intersecting multiple searches

Sometimes you'll want to create cool tailored searches that meet your needs. These can include a combination of factors and involve multiple strings and ID numbers.

For example, we might want to find people named Mark who have visited Boston in Lincolnshire, UK. If we did this entirely with strings, we might get Boston in Massachusetts, instead, as Facebook wouldn't know which Boston we wanted.



If we added the Facebook ID number for the UK city, 106646729369602, we would get the Boston in England. The search looks like this:



Remember to add /intersect to the end of combination searches.

Adding optional terms into a search

Using /union will allow you to add in option possibilities, for example a search for people named Mark or Tony who have visited Boston.



I have compiled the above list of Facebook graph search operators. Sometimes they work, other times they are suspended. Please let me know if you discover more or need any training on how to use them.

Paul Myers
July 2018



Back to top ↑                                                                                               (c) 2018 www.researchclinic.net




(c) Paul Myers 2016. The views expressed on this site are the author's own. The links do not represent an endorsement.
altered banner image (c) Jan Krömer, used with gratitude via creative commons license