newsfeed

newsfeed.search

Returns search results by statuses.

To call this method, you can use:

Parameters

q

string

Search query string (e.g., New Year).

extended

checkbox

1 — to return additional information about the user or community that placed the post.

count

positive

Number of posts to return.

latitude

string

Geographical latitude point (in degrees, -90 to 90) within which to search.

longitude

string

Geographical longitude point (in degrees, -180 to 180) within which to search.

start_time

positive

Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.

end_time

positive

Latest timestamp (in Unix time) of a news item to return. By default, the current time.

start_id

string

ID of the last obtained post. (Returned in search results to exclude already obtained posts from a new query selection).

offset

positive

Offset needed to select a specific subset of items.

start_from

string

fields

string

Additional fields of profiles and communities to return.

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.

Error codes

Common errors may occur during execution

Linked versions

Go to API versions page

If no end date is specified in the method call parameters, return objects that describe community They no longer have a field.. finish_data . Previously, this field was present in the response and contained the default, equal to start_date + 2 hours.

  • In the object that describes community The type of fields has changed. start_date and finish_date From string to numeric.

  • Methods that work with news, when the filter is installed friend Return the field user_id instead of uid .

  • In the method fave.getLinks Images are returned in the fields photo_50 and photo_100 instead of image_src and image_middle .

  • In method newsfeed.search added parameter extended , which returns the full results with all the necessary community and user data.

  • In the method friends.areFriends Altered field generation algorithm sign . Now he takes into account id the user.

  • Objects in the array notes which returns methods newsfeed.get and newsfeed.getRecommeded , now contain fields id and comments .

  • In the object describing the user , поля photo and photo_medium_rec renamed to photo_50 and photo_100 .

  • In the investment wall in field messages from and copy_owner Return the object user or community instead of an array.

Returns the result as an object containing information users and communities , необходимых для отображения найденных записей.