Developers » API methods » Newsfeed » newsfeed.search
Newsfeednewsfeed.search
Returns search results by statuses.
COMMENT: (1 of 5) I think the above description is inadequate. Any suggestions?
This method can be called by a service token. Only public data is returned.
This method can be called with a user token.
Parameters
qSearch query string (e.g., New Year).
string
extended1 to return additional information about the user or community that placed the post.
flag, either 1 or 0
countNumber of posts to return.
positive number, default 30, maximum value 200
latitudeGeographical latitude point (in degrees, -90 to 90) within which to search.
COMMENT: (2 of 5) The translation was missing, so I used Google Translate. Is it correct? I added "Geographical" because that was in the definition of longitude.
fraction
longitudeGeographical longitude point (in degrees, -180 to 180) within which to search.
COMMENT: (3 of 5) The translation was missing, so I used Google Translate. Is it correct?
fraction
start_timeEarliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.
positive number
end_timeLatest timestamp (in Unix time) of a news item to return. By default, the current time.
positive number
start_from
string, accessible for versions from 5.13
fieldsAdditional fields of profiles and communities to return.
list of comma-separated words
Show options for only old API versions
start_idID of the last obtained post. (Returned in search results to exclude already obtained posts from a new query selection).
string, outdated option, only for versions before 5.13
offsetOffset needed to select a specific subset of items.
positive number, outdated option, only for versions before 5.13
Result
Returns the total number of posts and an array of wall objects, as well as the following fields:
  • owner_id Post owner ID. If the post was left by a community, the parameter is-gid(group ID preceded by a minus sign).

If extended is set to 1, also returns the following:
  • profiles Contains user objects, as well as the following fields:
    • photo URL of the 50x50px user photo.
    • photo_medium_rec URL of the 100x100px user photo.
  • groups Contains community objects.
COMMENT: (5 of 5): There is Russian in the example below.
Errors
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
5.53
can_message, ban_info, can_post, can_upload_doc, can_upload_video, can_see_all_posts, can_create_topic, is_favorite, is_hidden_from_feed fields in a community object are returned for the requests including access_token only.
5.20
Wiki page in post is returned as page object.
A new need_source parameter was added for method pages.get, source field isnt returned by default now.
5.19
Group fields start_date and finish_date became numbers (were strings).
If friend filter is enabled, field user_id is returned instead of uid.
Method fave.getLinks returns images with names photo_50 and photo_100 instead of image_src and image_middle.
5.15
New extended parameter was added for method newsfeed.search to return additional information about the user or community that placed the post.
Method friends.areFriends was updated, sign field generation algorithm was changed: user id is added to id.
Note object presentation was fixed for newsfeed.get and newsfeed.getRecommeded: id and comments are returned now.
5.13
New param for pagination: start_from and returning field next_from.
5.12
New error types in audio.get, video.get.
New param for pagination: start_from and returning field next_from.
5.4
In all methods that return people objects, photo, photo_medium_rec fields were renamed to photo_50, photo_100.
In wall attachment from and copy_owner fields return as user or community object, not array.
4.9
4.3
Returns object, containing users and groups, related to found posts
Affects methods newsfeed.search