topSites

Use the topSites API to get an array containing all the sites listed in the browser's "New Tab" page.

The "New Tab" page is the page that opens when the user opens a new tab without immediately loading a page into it: for example, using the "Open a new tab" button. The browser generally fills this list with sites the user visits most often.

To use the topSites API you must have the "topSites" API permission.

Types

topSites.MostVisitedURL
An object containing the title and URL of a website.

Functions

topSites.get()
Gets an array containing all the sites listed in the browser's "New Tab" page. Note that the number of sites returned here is browser-specific, and the particular sites returned will probably be specific to the user, based on their browsing history.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
MostVisitedURLYesNo5252Yes
getYesNo5252Yes

Chrome incompatibilities

None.

Example extensions

Acknowledgements

This API is based on Chromium's chrome.topSites API.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,