GET /posts/search
Operation ID: search_posts
Auth: unknown
Description
Searching posts takes the same arguments as listing posts except for the addition of the search and sort_by parameters. NOTE: When paging through the posts returned by this endpoint, there will be at most 1,000 posts that can be returned (eg. 50 pages worth of posts with the default per_page value of 20). In areas where there are more than 1,000 posts, clients can use more specific query parameters to adjust which posts are returned.
Parameters (16)
(string, query, optional)
Only posts older than this UTC date and time will be returned. If unset, defaults to the current date and time.
(string, query, optional)
Only posts newer than or equal to this UTC date and time will be returned. If unset, defaults to the current date and time minus 90 days.
(number, query, optional, default: 1)
Client device pixel ratio used to determine thumbnail size (default 1.0).
(string, query, optional, default: The group IDs of every group the current user is a member of.)
A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). <br /><br /> NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). <br /><br/> *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
(integer, query, optional, default: 1)
If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
Constraints: {'minimum': 0, 'maximum': 1}
(number, query, optional)
The latitude of a point around which to return posts.
(number, query, optional)
The longitude of a point around which to return posts.
(string, query, optional)
A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn <br /><br /> There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
(integer, query, optional, default: 1)
The page of posts to return.
Constraints: {'minimum': 1}
(integer, query, optional, default: 20)
The number of posts to return per page (must be >= 1 and <= 100).
Constraints: {'minimum': 1, 'maximum': 100}
(number, query, optional)
The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
Constraints: {'minimum': 0, 'maximum': 257500}
(string, query, required)
The search query used to find posts.
(string, query, optional, default: relevance)
How to sort the posts that are returned. One of: relevance, date, active, distance <br /><br /> Relevance sorting will sort the posts that best match the search query first. Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
(string, query, required)
A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or the current users' location if latitude, longitude and radius aren't passed). <br /><br /> NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
(string, query, required)
A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
(string, query, optional)
If user_state is set, only posts matching the state specified will be returned. Only one state may be passed and it must be one of the following: viewed, replied, bookmarked <br><br> NOTE: This option will only work with oauth requests.
No probe data for this endpoint yet.