{"id":27808241,"url":"https://github.com/t-kuni/notion-database-exporter","last_synced_at":"2025-05-01T10:25:15.052Z","repository":{"id":57687872,"uuid":"487951693","full_name":"t-kuni/notion-database-exporter","owner":"t-kuni","description":"This tool exports Notion's database in csv format.","archived":false,"fork":false,"pushed_at":"2022-08-05T15:02:45.000Z","size":996,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T19:19:25.924Z","etag":null,"topics":["database","export","notion"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t-kuni.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}},"created_at":"2022-05-02T18:36:22.000Z","updated_at":"2025-01-03T16:30:30.000Z","dependencies_parsed_at":"2022-08-25T17:02:17.896Z","dependency_job_id":null,"html_url":"https://github.com/t-kuni/notion-database-exporter","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-kuni%2Fnotion-database-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-kuni%2Fnotion-database-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-kuni%2Fnotion-database-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-kuni%2Fnotion-database-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t-kuni","download_url":"https://codeload.github.com/t-kuni/notion-database-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251858478,"owners_count":21655395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database","export","notion"],"created_at":"2025-05-01T10:25:12.896Z","updated_at":"2025-05-01T10:25:15.043Z","avatar_url":"https://github.com/t-kuni.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# notion-database-exporter\n\nThis tool exports Notion's database in csv format.\n\n# Usage (node/npm)\n\nThe supported node version is **16.15**. Other versions have not been tested.\n\n1. Install command.\n\n```\nnpm i -g notion-database-exporter\n```\n\n2. Add Notion Integration from the following page.\n\nhttps://www.notion.so/my-integrations\n\n![](https://i.gyazo.com/8d7df191143076f35d7931686df1f035.png)\n\n3. Copy the token\n\n![](https://i.gyazo.com/fafb5f6977d9eff158d42351f1e31fb9.png)\n\n4. Open the page containing the database (even the parent page), click the Share button in the upper right corner, and then click the Invite button.\n\n![](https://i.gyazo.com/66b77eaa604c689e0b76ef95f29c489f.png)\n\n5. Select the integration you just created.\n\n![](https://i.gyazo.com/d5d183d82679a2faecfd66e0b2209240.png)\n\n6. Create `notion-db-exporter-secret.yml` in the folder where you run the command and write the token you just copied.\n\n```yaml\nnotionToken: XXXX\n```\n\n7. The following command will output CSV to the `notion-db-csv` folder.\n\n```bash\nnotion-database-exporter --export\n```\n\nYou can also only display a list of databases.\n\n```bash\nnotion-database-exporter --list\n```\n\n# Command Options\n\n| option | description | default |\n| --- | --- | --- |\n| `-c`, `--config` | Specify the path to the configuration file | `./notion-db-exporter.yml` |\n| `-s`, `--secret` | Specify the path to the secret file | `./notion-db-exporter-secret.yml` |\n| `-l`, `--list` | display a list of databases | true |\n| `-e`, `--export` | export databases | false | \n\n# Configuration\n\nYou can change the settings by placing `notion-db-exporter.yml` in the folder where you run the command.\n\n```yaml\n# Output directory.\noutDir: './notion-db-csv'\n\n# if want to filter database by title or id so enable below\n#includes:\n#  - title: \"Your Database Title1\"\n#  - title: \"Your Database Title2\"\n#  - id: \"Your Database id1\"\n#  - id: \"Your Database id2\"\n#excludes:\n#  - title: \"Your Database Title1\"\n#  - id: \"Your Database id1\"\n```\n\n# For development\n## Build\n\n```\nnpm run build\n# or\nnpm run watch\n```\n\n## Run\n\n```\ndist/main.js\n```\n\n## Run tests\n\n```\nnpm run test\n```\n\n## Build container\n\n```\ndocker build --tag example-container .\n```\n\n## Run container\n\n```\ndocker run example-container example\n```\n\n## Release new version\n\n[Document](https://gist.github.com/t-kuni/3d0a5cc86ab63cab3188160f5535afc0#%E6%96%B0%E3%81%97%E3%81%84%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%92%E6%8E%A1%E7%95%AA%E3%81%99%E3%82%8B)\n\n# Update all packages\n\n```\nnpm install -g npm-check-updates\nncu -u\nnpm install\n\n# Check\nnpm run test\nnpm run build\nnode dist/main.js\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-kuni%2Fnotion-database-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-kuni%2Fnotion-database-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-kuni%2Fnotion-database-exporter/lists"}