{"id":42430770,"url":"https://github.com/marc7806/notion-api-cache","last_synced_at":"2026-01-28T03:54:43.596Z","repository":{"id":172193787,"uuid":"489969069","full_name":"marc7806/notion-api-cache","owner":"marc7806","description":"Notion API proxy for caching and faster responses","archived":false,"fork":false,"pushed_at":"2025-12-13T18:38:01.000Z","size":142,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-15T13:06:14.659Z","etag":null,"topics":["api","cache","mongodb","notion","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marc7806.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-08T14:38:14.000Z","updated_at":"2025-12-13T18:37:58.000Z","dependencies_parsed_at":"2025-12-13T21:11:30.318Z","dependency_job_id":null,"html_url":"https://github.com/marc7806/notion-api-cache","commit_stats":null,"previous_names":["marc7806/notion-api-cache"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/marc7806/notion-api-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc7806%2Fnotion-api-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc7806%2Fnotion-api-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc7806%2Fnotion-api-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc7806%2Fnotion-api-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marc7806","download_url":"https://codeload.github.com/marc7806/notion-api-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc7806%2Fnotion-api-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28837421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T02:10:51.810Z","status":"ssl_error","status_checked_at":"2026-01-28T02:10:50.806Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cache","mongodb","notion","proxy"],"created_at":"2026-01-28T03:54:42.962Z","updated_at":"2026-01-28T03:54:43.590Z","avatar_url":"https://github.com/marc7806.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notion API cache\n\nA proxy for the [official Notion API](https://developers.notion.com/)\n\n[![Version](https://img.shields.io/docker/v/marc7806/notion-api-cache?logo=docker)](https://hub.docker.com/r/marc7806/notion-api-cache/tags)\n[![Docker Pulls](https://img.shields.io/docker/pulls/marc7806/notion-api-cache?logo=docker\u0026label=pulls)](https://hub.docker.com/r/marc7806/notion-api-cache/)\n\n## Main features\n💫 Blazing fast responses due to database caching\n\n🚀 Notion query syntax support\n\n✅ Flattened response data structure for easier attribute access\n\n## Usage\n### Query Endpoints\nIn order to query the notion-api-cache:\n```\nPOST http://localhost:8080/v1/databases/\u003cdatabase-id\u003e/query\n{\n    \"page_size\": 5,\n    \"start_cursor\": \"ef678e4c-54e6-4d71-ad31-93403be247e1\",\n    \"filter\": {\n        \"and\": [\n            {\n                \"property\": \"My Custom Property\",\n                \"text\": {\n                    \"equals\": \"Hello World\"\n                }\n            }\n        ]\n    },\n    \"sorts\": [\n        {\n            \"property\": \"Status\",\n            \"direction\": \"ascending\"\n        }\n    ]\n}\n```\n\nExample response:\n```json\n{\n    \"object\": \"list\",\n    \"results\": [\n        {\n            \"id\": \"e6d8b300-ea7c-11ec-8fea-0242ac120002\",\n            \"created_time\": \"2021-02-19T21:25:00Z\",\n            \"last_edited_time\": \"2021-02-19T21:25:00Z\",\n            \"properties\": {\n                \"My Custom Property\": {\n                    \"name\": \"Database Property 1\",\n                    \"type\": \"rich_text\",\n                    \"value\": \"Hello World\"\n                },\n                \"Database Title\": {\n                    \"name\": \"Database Title\",\n                    \"type\": \"title\",\n                    \"value\": \"My title\"\n                },\n                \"Status\": {\n                    \"name\": \"Status\",\n                    \"type\": \"select\",\n                    \"value\": \"Ready\"\n                }\n            }\n        },\n        ...\n    ],\n    \"next_cursor\": \"005ca066-3eb2-473a-82f7-17eb0a6455e8\",\n    \"has_more\": true\n}\n```\n\n#### Currently supported Notion filter operators\n* equals\n* does_not_equal\n* contains\n* starts_with\n* ends_with\n* is_empty\n* is_not_empty\n\n### Cache Management Endpoints\nUpdate Cache:\n```\nPOST http://localhost:8080/v1/cache/refresh\n```\nClear Cache:\n```\nPOST http://localhost:8080/v1/cache/clear\n```\nGet Cache Status:\n```\nGET http://localhost:8080/v1/cache/status\n```\nThe Caching Scheduler can be configured using the ``CACHE_SCHEDULER_HOURS``, ``CACHE_SCHEDULER_MINUTES`` and ``CACHE_SCHEDULER_DAYS`` environment variables. ``CACHE_SCHEDULER_DAYS=1`` would mean that the notion databases get synced once every day. With ``CACHE_ON_STARTUP=true`` you can configure to automatically trigger a cache refresh on application start.\n\n### Docker\n```docker\ndocker run -d \\\n    -e MONGODB_URI=\u003cmongodb-url\u003e \\\n    -e MONGODB_NAME=notion-api-cache \\\n    -e NOTION_API_KEY=\u003cnotion-api-secret-key\u003e \\\n    -e NOTION_DATABASES=\u003ccomma-separated-list-of-notion-database-ids\u003e \\\n    -e CACHE_SCHEDULER_DAYS=1 \\\n    -p 8080:8080 \\\n    --name notion-api-cache \\\n    marc7806/notion-api-cache:latest\n```\n\n### Docker Compose\nCreate a .env file in your root directory. An example file is already present ``.env.sample``.\nThe docker compose also starts a mongodb container.\n\n```docker\ncd docker/\ndocker compose up -d\n```\n\n## Supported caching providers\n### Mongodb\nUse mongodb to store your notion database data and query it with the native notion query syntax.\n\n## Metrics\nYou can read metrics from the `/metrics` endpoint. The metrics are exposed in the prometheus format.\n\n## Upcoming features\n✅ Cursor-based Pagination support\n\n✅ Scheduler for syncing the notion database data in defined intervals\n\n✅ Sorting support\n\n⬜ Api-token middleware for authentication\n\n⬜ Better notion query syntax and type support\n\n## Authors\nThis notion-api-cache was written by [Marc7806](https://github.com/marc7806/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarc7806%2Fnotion-api-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarc7806%2Fnotion-api-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarc7806%2Fnotion-api-cache/lists"}