A collection of Python scripts to interact with Raindrop.io bookmarks and collections using the Raindrop REST API.
all_bookmarks_df.py: Export all Raindrop bookmarks to a CSV file (all_bookmarks.csv) using pandas DataFramecreate_collection.py: Create a new collection in Raindrop (optionally under a specified group)list_collections.py: List all collections and display top-level groupstag_to_collection.py: Add a specified tag to all bookmarks in a specific collection
- Export bookmarks to CSV with selected columns (ID, title, link, tags, excerpt, created, lastUpdate)
- Create new collections with optional parent group
- List and filter collections by top-level groups
- Bulk add tags to collections while skipping existing tags
- Direct integration with Raindrop REST API
- Rate limiting to respect API limits (0.1s delay between calls)
- Environment-based configuration for security
- Python 3.6+
- A Raindrop account with API access
-
Clone this repository
-
Install dependencies:
pip install -r requirements.txt
-
Copy
.env_exampleto.envand fill in your values:cp .env_example .env
Edit the .env file with your Raindrop credentials and script parameters:
RAINDROP_API_TOKEN: Your Raindrop API token (get from Raindrop settings > Integrations)RAINDROP_COLLECTION_ID: The ID of the collection to modify (used bytag_to_collection.py)RAINDROP_TAG: The tag to add to bookmarks (used bytag_to_collection.py)NEW_COLLECTION_NAME: Name for the new collection (used bycreate_collection.py)GROUP_ID: Optional parent group ID for new collection (used bycreate_collection.py)
Run the script to export all bookmarks:
python all_bookmarks_df.pyThis will create all_bookmarks.csv with all your Raindrop bookmarks.
Run the script to create a collection:
python create_collection.pyRequires NEW_COLLECTION_NAME in .env. Optionally uses GROUP_ID for nested collections.
Run the script to list all collections:
python list_collections.pyDisplays the total number of collections and lists top-level groups.
Run the script to add a tag to all bookmarks in a collection:
python tag_to_collection.pyRequires RAINDROP_COLLECTION_ID and RAINDROP_TAG in .env. Skips bookmarks that already have the tag.
To get your Raindrop API token:
- Go to Raindrop.io
- Open Settings > Integrations
- Generate a new API token
- Copy the token to your
.envfile
Scripts include delays between API calls to respect Raindrop's rate limits (0.1 second delay in tag addition script).
- Invalid API token results in 401 Unauthorized
- Invalid collection ID results in 404 Not Found
- Network errors are caught and displayed
- Missing environment variables raise ValueError
This project is open source. Feel free to use and modify as needed.