How to fetch Save for later pages in SPFx Web part.

Occasional Contributor


Microsoft rolled out new feature 'save for later' for modern pages. Once Save for later is clicked, it becomes Saved for later, and the associated icon is filled in. 

Save for later command on a page

When Saved for later is clicked, a list of Recently saved items is displayed. You can click See all saved items to see the entire list of saved items. Entire list get visible on _layout/15/sharepoint.aspx page under Saved tab.

Recently saved items

I have requirement to show these saved pages using spfx web part. I googled on this to find the way but I haven't got anything to fetch these saved pages.

I tried below things to get these saved pages but it's not return saved pages data.

1. Undocumented service - /_vti_bin/homeapi.ashx



Br/ Siddheshwar

4 Replies



I found the way. here is the code snippet:


private async _getApiToken() : Promise<string> {
const siteCollectionUrl = this.props.context.pageContext.web.absoluteUrl;
const restQuery = `${siteCollectionUrl}/_api/sphomeservice/context?$expand=Token`;
const httpClientOptions: ISPHttpClientOptions = {};
const response: SPHttpClientResponse = await this.props.context.spHttpClient.fetch(restQuery, SPHttpClient.configurations.v1, httpClientOptions);
const responseJson: any = await response.json();
return responseJson.Token.access_token;
// Improvement: Grab the Hub api URL from: responseJson.Urls


private async _getsavedForLaterPages(): Promise<void> {
const isHubSite = await this._isHubSite();

if (!isHubSite) return;
const token = await this._getApiToken();
const restQuery = `https://{region}`;
const httpClientOptions: IHttpClientOptions = {
headers: {
'authorization': `Bearer ${token}`,
'sphome-apicontext': `{"PortalUrl":"${}"}`
const response: HttpClientResponse = await this.props.context.httpClient.fetch(restQuery, SPHttpClient.configurations.v1, httpClientOptions);
const responseJson: any = await response.json();
console.log("Saved for later data:"+responseJson);


Thank You,

Siddheshwar Kohale


Hi All,


As I'm using undocumented service to get the save for later pages data. 

But after some day this functionality stopped working so I to find root cause I debugged the source code and found that region {northeurope4} mentioned the service get keep changing after some days.


I don't know why it's changing so frequently , is there any way out to resolve this kind of issue?


Thank You.


best response confirmed by Siddheshwar (Occasional Contributor)

The json payload returned from:


includes a node named:


which seems to show the complete hostname of the to use.


You rightly point out this is not a documented API, so I wouldn't use it in any production code.

Looks like there is a BETA graph APi to retrieve followed (Saved for later) items for the current user. I have tested in the graph explorer and was able to retrieve my saved for later items.