Facebook Graph Search Operators

Collated by Paul Myers
 

 

How to use Facebook Graph Search

 

PDF version

 

(c) 2018 www.researchclinic.net

 

 

Basics, search prefixes and adjuncts

http://www.facebook.com/search/

All Graph searches begin with this

/intersect/

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

/union/

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

/str/

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

/year/date/

or to specify a page or account, try:

id/stories-by/2014/date-1/stories/intersect

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

/present

/ever-past

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

Events

/str/name/users-named/events

/id/events  (not currently working - July 2018)

Future events someone is interested in attending
/events/year/date/events/

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

Events someone was interested in, during a given year or years
/str/name/users-named/events-joined/year/date/events/

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

Events someone joined in a past year
/me/events-near

/place id/events-near

/str/place name/pages-named/events

events near me or events near a place

Back to top ↑

 

 

Pages liked

/likers

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

 

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
/wives
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-checked-in  
/places-visited  Towns, cities and countries visited by someone
/users-birth-place  
/home-residents  

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

/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

/str/keyword/pages-named/speakers

people who speak a language

Back to top ↑

 

 

Employment

/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

Professions

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 ↑

 

 

Business
/visitors

/str/place/places-named/visitors/

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

Education

/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

males/users-interested/males/intersect

for gay men

females/users-interested/females/intersect

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

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

Religion and beliefs

/users-religious-view

/str/keyword/pages-named/users-religious-view

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

/users-political-view

/str/keyword/pages-named/users-political-view

 

specify peoples' political views
Politics codes
Conservatives 104082972962342
Socialists 103794206325342
Liberals 114494755234706
Islamic politics 109523995740640

Users' age

/age/users-older/ minimum age

Gender

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

Links

Stalkscan.com

Peoplefindthor

Graph.tips

Inteltechniques

Netbootcamp

Whopostedwhat

 

 

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

Back to top ↑

 

 

Appendix

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.

https://www.facebook.com/search/4/places-visited/

 

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:
 

https://www.facebook.com/search/str/mark/users-named/places-visited/

 

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