---
schema_version: "1"
id: 4e56a396251b763e21f49a1b40f98c9f139586b190733981bf3668f3c56a5d6b
title: Recently Viewed Items
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/resources/resources-recent-items.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/resources-recent-items.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f6876012fcfe10b13f8f705605b2e02faf6d55b4d1a68ee67113922348c99828
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Recently Viewed Items

Gets the most recently accessed items that were viewed or referenced by the current user. Salesforce stores information about record views in the interface and uses it to generate a list of recently viewed and referenced records, such as in the sidebar and for the auto-complete options in search.

This resource only accesses most recently used item information. If you want to modify the list of recently viewed items, you must update recently viewed information directly by using a SOQL Query with a `FOR VIEW` or `FOR REFERENCE` clause.

**note:** The API response filters and displays recent records based on the permissions of the token or session ID user.

**URI:** `/services/data/vXX.X/recent`

**Formats:** JSON, XML

**HTTP Method:** GET

**Authentication:** `Authorization: Bearer token`

**Parameters**

|Parameter|Description|
|---------|-----------|
|`limit`|An optional limit that specifies the maximum number of records to be returned. If this parameter is not specified, the default maximum number of records returned is the maximum number of entries in RecentlyViewed, which is 200 records in total.|

## Example

-   For an example of retrieving a list of recently viewed items, see [View Recently Viewed Records](https://developer.salesforce.com/docs/platform/api-rest/do-me/dome-see-recently-viewed.md).
-   For an example of setting records as recently viewed, see [Mark Records as Recently Viewed](https://developer.salesforce.com/docs/platform/api-rest/do-me/dome-mark-records-as-recently-viewed.md).

