topSites

The topSites permission provides access to the list of the user's most frequently visited websites.

What it does

  • Allows an extension to get an array of the user's most visited URLs.
  • The returned data includes the URL and title for each site.
  • This is the same data that is used to populate the "most visited" tiles on Chrome's default New Tab Page.

When to use it

This permission is almost exclusively for extensions that create a custom New Tab Page or a personalized launcher.

Examples:

  • A custom New Tab Page that displays the user's top sites with custom styling.
  • A "speed dial" extension that provides quick access to the user's favorite sites.
  • A productivity dashboard that includes a section for frequently visited pages.

Manifest Declaration

{
  "name": "My Custom New Tab Page",
  "version": "1.0",
  "manifest_version": 3,
  "permissions": [
    "topSites"
  ],
  "chrome_url_overrides": {
    "newtab": "newtab.html"
  }
}

Security & Privacy

Why is it risky?

This permission allows an extension to see the list of websites you visit most frequently. This data can reveal a lot about your personal interests, work, and online habits.

A malicious extension could use this information to build an advertising profile on you or sell the data to third parties. Legitimate extensions use this to create helpful "New Tab" pages with shortcuts to your favorite sites. You should be aware that you are sharing a part of your browsing history with any extension that requests this.

API Usage Example

This example gets the user's top 8 sites and logs them to the console.

// newtab.js or any other extension script

async function displayTopSites() {
  try {
    const topSites = await chrome.topSites.get();

    if (topSites.length > 0) {
      console.log("User's top sites:");
      topSites.forEach((site, index) => {
        console.log(`${index + 1}. ${site.title} (${site.url})`);
        // In a real new tab page, you would render this data to the DOM.
      });
    } else {
      console.log("Could not retrieve top sites.");
    }
  } catch (error) {
    console.error("Error getting top sites:", error);
  }
}

displayTopSites();

Extensions with the topSites permission

Here are some popular browser extensions that use the "topSites" permission. To explore more, try our Advanced search.

Permission Metrics

Popularity

Security Risk


Usage by Platform