Research Clinic
supporting open source investigation


Facebook Graph Search Operators

Collated by Paul Myers


How to use Facebook Graph Search


PDF version


(c) 2018



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
/id/stories-commented/id/stories-by/intersect combination search example
/str/keyword/stories-keyword/ looks for a word in a post
/str/keyword/stories-keyword/city code/residents/stories-by/intersect posts sent by residents of a city
/str/keyword/stories-keyword/jul/2018/date-2/stories/intersect posts sent on a date

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 - July 2018)

Future events someone is interested in attending

/events/year a/date/events/year b/date/events/union/

Events someone was interested in, during a given year or years

/events-joined/year/date/events/ (not working - July 2018)

Events someone joined in a past year

/place id/events-near

/str/place name/pages-named/events

events near me or events near a place

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
closed/groups-privacy/code/employees/groups/ private groups belonged to by employees of a company
/str/group name/groups-named/members finds members of a named group

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 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 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



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/ lists companies that employ someone of a specified name
/employer/pages/code/likers/employers companies that employ people that like a certain page


code/job-liker-union/employees/ lists people of a profession

Profession Codes

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



specify peoples' beliefs

Religion Codes

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




specify peoples' political views
Politics codes
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 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 and to look up the ID associated with a Facebook account or page.

For example, Mark Zuckerberg's Facebook page is

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




(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