Developers » API methods » Newsfeed » newsfeed.get
Returns data required to show newsfeed for the current user.
This method can be called with a user token. Access rights required: wall and friends.
filtersFilters to apply:
post new wall posts
photo new photos
photo_tag new photo tags
wall_photo new wall photos
friend new friends
note new notes
list of comma-separated words
return_banned1 to return news items from banned sources
flag, either 1 or 0
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
max_photosMaximum number of photos to return. By default, 5.
positive number
source_idsSources to obtain news from, separated by commas.

User IDs can be specified in formats <uid> or u<uid>
where <uid> is the user's friend ID.

Community IDs can be specified in formats -<gid> or g<gid>
where <gid> is the community ID.

If the parameter is not set, all of the user's friends and communities are returned, except for banned sources, which can be obtained with the newsfeed.getBanned method.
COMMENT: (1 of 2) Can't we just set the return_banned parameter above?
start_fromidentifier required to get the next page of results.
Value for this parameter is returned in next_from field in a reply.
string, accessible for versions from 5.13
countNumber of news items to return (default 50; maximum 100). For auto feed, you can use the new_offset parameter returned by this method.
positive number
fieldsAdditional fields of profiles and communities to return.
list of comma-separated words
Show options for only old API versions
fromValue obtained in the new_from field from the last loaded news. It prevents duplicate news during auto feed.
string, outdated option, only for versions before 5.13
offsetOffset needed to return a specific subset of news items.
int (number), outdated option, only for versions before 5.13
COMMENT: (2 of 2) There is Russian in the code sample below.
Returns an object containing the following fields:
  • items News array for the current user.
  • profiles Information about users in the newsfeed.
  • groups Information about groups in the newsfeed.
  • new_offset Contains an offset parameter that is passed to get the next array of news.
  • next_from Contains a from parameter that is passed to get the next array of news.

Items field description
Contains an array of wall objects, as well as the following fields:
  • type Type of newsfeed, based on the specified filters (e.g., post, photo).
  • source_id ID of the news source (positive number signifies a user; negative number signifies a community).
  • post_id Post ID on the owner wall.
  • photos, photo_tags, notes, friends Information about the count of objects of corresponding types (except wall posts) and up to the last 5 objects related to the current news.

Each array element in the photos and photo_tags fields contains:
  • pid Photo ID.
  • owner_id Photo owner ID.
  • aid Photo album ID.
  • src URL of the preview image.
  • src_big URL of the full-size image.

Each array element in the notes field contains:
  • nid Note ID.
  • owner_id Note owner ID.
  • title Note title.
  • ncom Number of note comments.

Each array element in the friends field contains:
  • uid User ID.

Profiles field description
Contains an array of 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 field description
Contains an array of community objects with information about communities found in news.

NOTE: You can get the full list of photos, returned with type photo or photo_tag with the photos.get method, using parameters feed (date of event in date field), feed_type (event type, photo or photo_tag), and uid ID of user for whom event has occurred (source_id field).
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
The template field was added to the message object.
account.getInfo method returns an additional 2fa_required field for accounts with 2FA. Restriction for the feed parameter has been added in photos.get method.

button field has a new structure for attachments with link type.
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.
Support fields parameter for user profiles
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.
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.
New extended parameter was added for method 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.
New param for pagination: start_from and returning field next_from.
New error types in audio.get, video.get.
New param for pagination: start_from and returning field next_from.
New format of posts:
to_id instead of owner_id
reply_post_id instead of reply_to in copy_history field
Field post_type returns post instead of copy for reposts.
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.
Fix photos_list attachment. (photo_list before). Some other fixes that was not implemented in api 5.0
Photos_list attach new format.
No album link in post text when album is attached.