The advanced search syntax is a powerful way to better define your search query, based on multiple criteria and operators, to get more specific and targeted search results.
The guidelines for performing a user search with advanced syntax in the search field are:
- Search criteria and operators are not case sensitive so lowercase or uppercase are both valid.
- The operator AND (or a space) returns users with both words in the search field.
- e.g. ‘marketing AND social’ or ‘marketing social’ returns users with both of these two words.
- The operator OR returns users with either word in the search field.
- e.g. ‘marketing OR social’ returns all users with either either of these two words.
- The operator NOT returns all users without that specific word in the search field.
- e.g. ‘marketing NOT social’ returns users with marketing but not social.
- Single or double quotations search for an exact phrase.
- e.g. ‘social media’ or “social media”.
- Parentheses can be used to force the priority of the operators. For example, the following two searches would return different results:
- (bio:marketing OR bio:social) AND location:Madrid
- bio:marketing OR (bio:social AND location:Madrid)
Let’s search for users based in ‘Boston’ or ‘London’, with the words ‘Marketing’ or ‘Social’ in their bios. There are two ways to do this, both of which return exactly the same results.
1. You can use the bio and location fields in the search/filter sidebar to enter your keywords.
The search criteria is shown in the breadcrumb bar.
2. You can use the general search field at the top of the search/filter sidebar.
The search query is shown in the breadcrumb bar.
- (bio:marketing OR bio:social) AND (location:boston OR location:london)
If you don’t specify a search category and, for example, enter the term ‘marketing‘ this will be searched for in all three search categories of the users.
Another example. Let’s search for users with the words ‘urban’ and ‘planner’ in their bios but exclude those users with the words ‘politician’ and ‘event’ in their bios. The query to write in the general search field would be:
- bio: planner AND urban AND (NOT politician AND NOT event)
There are other search options to use in the general search field.
- For language searches write: lang:_____
To find those users who have twitter.com configured in English write: ‘lang:en’
You must use the ISO letter language codes in lowercase, e.g. en=English, es=Spanish, de=German, ja=Japanese, pt=Portuguese, ru=Russian, it=Italian, fr=French, nl=Dutch.
- For country searches write: country:_____
To find those users in Spain write: ‘country:ES’
You must use the ISO letter country codes in uppercase, e.g. GB=Great Britain, ES=Spain, DE=Germany, JP=Japan, PT=Portugal, RU=Russian Federation, IT=Italy, FR=France, NL=Netherlands.
- For time zone searches write: timezone:_____
To find those users who use the Madrid time zone write: ‘timezone:madrid’
- For URL searches write: url:_____
To find those users who have a specific url, e.g. ‘www.audiense.com’ in their bio write: ‘url:www.audiense.com’
Note that this search will also return related URLs, e.g. ‘www.audiense.com/products’.
- For screenname/handle searches write: screenname:_____
To search for a specific user screenname write, for example, ‘screenname:@amnestyuk’ or ‘screenname:amnestyuk’.
A useful search option is to search the tags and notes you have applied to any users.
- For notes searches write: notes:_____
To find those users with the word ‘important’ in their notes write: ‘notes:important’
- For tag searches write: tag:_____
To find those users who have a specific tag added to their profile.
There is a slight difference between a my community search and an all Twitter search when searching for an exact term.
- An all Twitter search using, for example: bio: ‘sky’ returns only those users with that exact word in the bio.
- A my community search returns users with any word which contains the search criteria, i.e. not only users with the exact word ‘sky’ but also those with risky, skydive, skyscraper, whisky, etc.