chrome.topSites

Description: Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
Availability: Stable since Chrome 19.
Permissions: "topSites"

Manifest

You must declare the "topSites" permission in your extension's manifest to use this API.

      {
        "name": "My extension",
        ...
        "permissions": [
          "topSites",
        ],
        ...
      }
      

Examples

You can find samples of this API in Samples.

Summary

Types
MostVisitedURL
Methods
get chrome.topSites.get(function callback)

Types

MostVisitedURL

An object encapsulating a most visited URL, such as the URLs on the new tab page.
properties
string url The most visited URL.
string title The title of the page

Methods

get

chrome.topSites.get(function callback)

Gets a list of top sites.

Parameters
function callback

The callback parameter should be a function that looks like this:

function(array of MostVisitedURL data) {...};
array of MostVisitedURL data