DIY Pocket Alternative with Notion and FastAPI
18-Aug-2025

As a voracious consumer of online content, I've long relied on read-later apps to tame the endless stream of articles, blog posts, and interesting tidbits I stumble upon daily. Like many, Pocket became my go-to tool for this purpose. It's undeniably convenient, allowing you to save links from anywhere and revisit them later.

However, as Pocket seems to be shutting down & all my notes and tasks are saved on Notion, I started to wonder if I could consolidate my workflows. Notion's flexibility is a huge draw, and the idea of having my saved articles seamlessly integrated with my notes, tasks, and other information felt incredibly appealing.

That's when the idea for my side-project was born: a read-later app that leverages the power of the Notion API. The core concept was simple: instead of sending articles to Pocket, save them directly into a dedicated Notion database. You just need to create a new Notion database and note down its database id. You can get this from the URL - https://notion.so/workspace-id/database-id?other=random-stuff.

While Notion's API is powerful, I quickly hit a roadblock. The Notion API, for security reasons, doesn't directly support Cross-Origin Requests (CORS) from web browsers. This meant I couldn't simply build a browser extension or a web app that directly communicated with Notion's API to save links.

To overcome this limitation, I needed a middleman, a lightweight backend server built in Python with FastAPI. I already had a VM to run a couple of my other side-projects. Why not use this VM to host my FastAPI server.

FastAPI proved to be an excellent choice for this task. It's a modern, high-performance web framework for building APIs with Python, and it made setting up the necessary endpoints incredibly straightforward.

Here's a simplified overview of how it works:

  1. Saving a Link: When I want to save an article, my (currently very basic) Chrome extension sends the URL to my FastAPI server.
  2. The FastAPI Server:
    • Receives the URL.
    • Authenticates the request using JSON web tokens(JWT).
    • Uses the Notion API python client to create a new page in my designated Notion database, with the article's URL and potentially its title.
  3. Notion Database: The link is now saved as a new page within my Notion read-later database, ready for me to access, tag, and integrate with my other Notion content.

Here's a snippet of the FastAPI code:

@app.post('/saveLinkNotion')
async def get_raw_body(request: Request):
    headers = dict(request.headers)
    if headers["credentials"] != token:
        return {"status": "auth failed"}, 500
    body = await request.json()
    notion = Client(auth=notion_token)
    new_page = {
        "Title": {"title": [{"text": {"content": body['title']}}]},
        "Tags": {"type": "multi_select", "multi_select": [{'name': i} for i in body['tags']]}, 
        "Link": {
            "type": "rich_text",
            "rich_text": [
                {
                    "type": "text",
                    "text": {"content": body['link']},
                },
            ],
        },
    }
    notion.pages.create(
        parent={"database_id": notion_links_db_id}, properties=new_page
    )
    return {"status": "success"}

While this side-project is still in its early stages, it has already provided some significant benefits for my workflow. Notion's database features allow me to easily categorize, tag, and add notes to my saved articles. The beauty of DIY is the potential for further customization. I can envision adding features like automatic tagging based on content, extracting summaries, or even integrating with other Notion workflows.

While it's not a polished, user-friendly alternative to Pocket (yet!), it perfectly scratches my itch for a more integrated read-later experience within my Notion ecosystem. Maybe I'll eventually open-source it or build it into something more robust. For now, I'm enjoying the process of building and using my own custom read-later solution.