The bookmarks permission allows an extension to interact with the browser's bookmark system.
What it does
- Read: Search for, get, and list all of a user's bookmarks and bookmark folders.
- Create: Add new bookmarks and folders.
- Update: Modify the title and URL of existing bookmarks.
- Move: Reorganize bookmarks and folders within the bookmark tree.
- Delete: Remove bookmarks and folders.
When to use it
Use this permission if your extension's core functionality involves managing or interacting with bookmarks.
Examples:
- A "bookmark manager" that provides an alternative UI for organizing bookmarks.
- An extension that automatically creates bookmarks for specific pages.
- A "dead link checker" that scans a user's bookmarks for broken URLs.
- An extension that exports or imports bookmarks in a custom format.
Manifest Declaration
This permission triggers a warning during installation.
{
"name": "My Bookmarks Extension",
"version": "1.0",
"manifest_version": 3,
"permissions": [
"bookmarks"
],
"action": {}
}Security & Privacy
Why is it risky?
Your bookmarks can reveal a lot about your interests, work, and personal life. This permission gives an extension full control to:
- Read all your bookmarks and folders.
- Add new bookmarks (e.g., spam or advertising links).
- Delete or change your existing bookmarks.
While many legitimate extensions use this to help you manage your bookmarks, a malicious one could spy on your saved sites or edit your bookmarks to point to malicious sites. You should only grant this to extensions from developers you trust.
API Usage Example
This example finds and logs all bookmarks for "google.com" when the user clicks the extension icon.
// background.js
chrome.action.onClicked.addListener(() => {
searchGoogleBookmarks();
});
function searchGoogleBookmarks() {
chrome.bookmarks.search('google.com', (results) => {
if (chrome.runtime.lastError) {
console.error(chrome.runtime.lastError.message);
return;
}
if (results.length > 0) {
console.log(`Found ${results.length} bookmark(s) for 'google.com':`);
results.forEach((bookmark) => {
console.log(` - Title: ${bookmark.title}`);
console.log(` URL: ${bookmark.url}`);
console.log(` ID: ${bookmark.id}`);
});
} else {
console.log("No bookmarks found for 'google.com'.");
}
});
}Extensions with the bookmarks permission
Here are some popular browser extensions that use the "bookmarks" permission. To explore more, try our Advanced search.