Throughout Zoomph filtering feeds is supported to narrow down the data that is analyzed and returned. This guide describes the supported filters and their syntax.
Syntax
The basic syntax for a filter takes the following shape: [field][operator]"[value]"
Some examples:
- message:"puppy" - This will search for content with the word "puppy" in the message
- zpoints>=10 - This will search for content with 10 or more ZPoints
- username:"@zoomph" - This will search for content from the @Zoomph account
Grouping ANDing/ORing and Negations
Filters can be ANDed/ORed by specifying AND/OR between them and can be logically grouped using parenthesis. Negations can be specified by prefixing the filter with !
Some examples:
- (message:"puppy" OR message:"kitten") AND zpoints<10 - This will search for content with the word "puppy" or "kitten" in the message, and with less than 10 ZPoints.
- !message:"kitten" AND message:"puppy" - This will search for content that says "puppy" but does not contain the "kitten."
- username:"@zoomph" AND message:"social media" AND created>"2016-01-01T05:00:00Z" - This will search for content from Zoomph containing the phrase “social media” and was created after January 1 at 5AM (UTC).
Filters
- contentType - the multimedia type of the content
- Possible values (case sensitive)
- TEXT
- PHOTO
- VIDEO
- Possible values (case sensitive)
- created - the date the content was created
- dataSource - the original source of the content
- Possible values (case sensitive)
- GOOGLEPLUS
- CHATTER
- RSS
- DIRECTUPLOAD
- YOUTUBE
- Possible values (case sensitive)
- displayName - the display name of the author
- hashtag - search for hashtags contained within the text (the # is optional)
- locationText - the free-form location text field of the author
- mention - search for mentions contained within the text (the @ is optional)
- message - search the text body of the content (if searching for hashtags, mentions, or emojis, use the other fields described)
- status - the moderation status of the content
- Possible values (case sensitive)
- PENDING
- APPROVED
- REJECTED
- Possible values (case sensitive)
- tag - search for content with a specific moderation tag
- username - search based on the username/handle of the author
- verified - whether the author of the content is verified on the network that his/her content originates from
- Possible values (case sensitive)
- TRUE
- FALSE
- Possible values (case sensitive)
- zpoints - the number of ZPoints the content has
- geoFips - search for content with a geolocation in a given country/province FIPS code
- geoRadius - search for content with a geolocation within a distance from a central point. i.e. content within a circle defined by a central point and radius
- EX) geoRadius:{lat=38 lon=-77 radiusKm=1}
- This will search for content within a 1km distance of the lat/lon 37/-77 (Washington DC)
- EX) geoRadius:{lat=38.956782 lon=-77.351338 radiusKm=0.1}
- This will search for content within 100 meters of the Zoomph HQ office
- EX) geoRadius:{lat=38 lon=-77 radiusKm=1}
- authorBio - search for content with authors whose biography contains terms
- formData - search for content based on form fields' key-value pairs
- EX) formData:[key="Email" AND value:"some@email.com"]
- This will search for a key-value pair with a key called Email and a value containing some@email.com
- EX) formData:[key="Email" OR !value:"some@email.com"]
- This will search for a key-value pair which has a key named Email or a value which does not contain some@email.com
- EX) formData:[key="Email" AND value:"some@email.com"]
- audienceMember - search for content by authors who are in a given audience, the audience can be a saved one (referenced by its ID) or defined through the Audience Filter DSL
- EX) audienceMember:[followsId:250327399]
- This will search for content by authors who follow @Zoomph (Zoomph's Twitter user ID is 250327399)
- EX) audienceMember:[followsId:250327399 OR followsId:506360867]
- This will search for content by authors who follow @Zoomph or @Kohner86
- EX) audienceMember:[followsId:250327399]
- TEXT
- PHOTO
- VIDEO
- GOOGLEPLUS
- CHATTER
- RSS
- DIRECTUPLOAD
- YOUTUBE
- PENDING
- APPROVED
- REJECTED
- TRUE
- FALSE
- This will search for content within a 1km distance of the lat/lon 37/-77 (Washington DC)
- This will search for content within 100 meters of the Zoomph HQ office
- This will search for a key-value pair with a key called Email and a value containing some@email.com
- This will search for a key-value pair which has a key named Email or a value which does not contain some@email.com
- This will search for content by authors who follow @Zoomph (Zoomph's Twitter user ID is 250327399)
- This will search for content by authors who follow @Zoomph or @Kohner86
Operators
- = Numerical value must exactly match
- >= Numerical value must be greater or equal
- > Numerical value must be greater than
- <= Numerical value must be less than or equal
- < Numerical value must be less than
- : String value must be present (used for text fields, such as message and enumerations like contentType)