A tool to scrape LeetCode's Top Interview 150 problems and create a trackable Notion database for your study progress.
- Go to Notion Integrations
- Create a new internal integration
- Copy the "Internal Integration Secret"
- In Notion, create a parent page where you want the database
- Share that page with your integration (••• → Add connections)
- Copy the page ID from the URL (the long hex string)
- Copy
.env.example
to.env
:
cp .env.example .env
- Fill in your values in
.env
:
NOTION_TOKEN=secret_your_integration_token_here
NOTION_PARENT_PAGE_ID=your_parent_page_id_here
npm install
- Go to LeetCode Top Interview 150
- Open DevTools Console (F12)
- Copy and paste the contents of
scraper.js
into the console - Press Enter and wait for the download
This will download leetcode_top150.json
with all the problems.
node import.js
This will:
- Create a new Notion database (or update existing one)
- Import all problems with proper categorization
- Set up tracking fields for your study progress
The created Notion database includes these properties:
- Name - Problem title
- URL - LeetCode problem link
- LeetCode ID - Problem number
- Slug - URL slug for deduplication
- Difficulty - Easy/Medium/Hard
- Topic - Problem category (Array, String, etc.)
- Status - Not Started/In Progress/Completed/Reviewed
- Claimed by - Who's working on it
- Completed by - Who finished it
- Date Started - When work began
- Date Completed - When finished
- Time Spent - Minutes invested
- Attempts - Number of tries
- Notes - Personal notes
- Solution Link - Your solution repository
- Tags - Custom tags
- Priority - High/Medium/Low
- Use "Claimed by" to assign problems
- Use "Completed by" to track who finished
- Filter by person to see individual progress
- My Problems - Filter by your name in "Claimed by"
- By Topic - Group by Topic property
- By Difficulty - Filter Easy/Medium/Hard
- Progress Board - Kanban view grouped by Status
- Claim a problem by adding your name to "Claimed by"
- Set Status to "In Progress" and Date Started
- When done, set Status to "Completed", add Date Completed
- Add your name to "Completed by"
- Optionally add time spent and notes
The import script is idempotent - you can run it multiple times without creating duplicates. It matches problems by slug and URL.
scraper.js
- Browser console script to extract problemsimport.js
- Node script to create/update Notion database.env
- Your Notion credentials (not in git).env.example
- Template for environment variables