{"id":15874502,"url":"https://github.com/rudifa/go-notion","last_synced_at":"2025-09-23T13:17:14.685Z","repository":{"id":159917080,"uuid":"631344417","full_name":"rudifa/go-notion","owner":"rudifa","description":"Learning to retrieve data from a Notion database using go language","archived":false,"fork":false,"pushed_at":"2023-05-05T19:07:10.000Z","size":8099,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T22:48:34.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/rudifa.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}},"created_at":"2023-04-22T18:15:04.000Z","updated_at":"2023-04-22T18:15:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"6885d9bc-265a-460d-a703-1bc05f262f1f","html_url":"https://github.com/rudifa/go-notion","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rudifa/go-notion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudifa%2Fgo-notion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudifa%2Fgo-notion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudifa%2Fgo-notion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudifa%2Fgo-notion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rudifa","download_url":"https://codeload.github.com/rudifa/go-notion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudifa%2Fgo-notion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276582011,"owners_count":25667811,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-06T01:40:30.682Z","updated_at":"2025-09-23T13:17:14.643Z","avatar_url":"https://github.com/rudifa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notion API access using go language\n\nDemo based on [Getting started with the Notion API JavaScript SDK](https://dev.to/craigaholliday/getting-started-with-the-notion-api-javascript-sdk-c50) -\u003e `retrieveDatabase`\n\n## Notion setup\n\nIn the target Notion workspace - Settings - Connections - Develop and manage integrations:\n\n- create a new Integration, give it a name\n- copy the `Internal Integration Token` to the local file .env\n\nIn the target Notion workspace - target page:\n\n- ... menu - Connections: add a connection to the named Integration\n- Share - Copy link: copy the url link and paste into a text editor\n- extract the first 32-character `UUID` and paste it into the local .env file\n\n## Setup\n\n**Requires** a file named `.env` in the project directory, containing the keys from Notion\n\n```\nNOTION_INTEGRATION_TOKEN=secret_n3w...ZWq # 56 chars `Internal Integration Token`\nNOTION_DATABASE_ID=ef7...b44              # 32 chars `UUID`\n# NOTION_DATABASE_ID=... # comment out unused tokens\n```\n\nTo change the target Notion workspace or the database, edit your `.env` file\nadding the new tokens and commenting out or removing the old tokens.\n\n## Run dev\n\n`go run go-notion.go` # build an in-memory executable and run it\n\n## Build and run\n\n`go build go-notion.go` # build the executable `go-notion` in the project directory.\n\n`./go-notion` # run the executable\n\n## Test\n\n`go test ./...` # run unit tests\n\n## Usage\n\n```\nUsage:\n  go-notion [command]\n\nAvailable Commands:\n  help        Help about any command\n  query       Query the database\n  retrieve    Retrieve data from the database\n\nFlags:\n  -h, --help   help for go-notion\n\nUse \"go-notion [command] --help\" for more information about a command.\n```\n\n## Notes\n\nThis version supports command prefix matching (it suffices to enter the leading letters of a command).\n\nThis version of `go-notion` runs the functions `QueryDatabase`and `RetrieveDatabase`\nwith tokens specified in the `.env` file (required)\nand prints to stdout the received json string.\n\n`query` retrieves successfully a Notion table containing 796 entries (117614 lines, 4.2MB).\n\nThis program uses no Notion specific libraries.\n\n## Notion API docs\n\n[Retrieve a database](https://developers.notion.com/reference/retrieve-a-database) -\u003e `RetrieveDatabase`\n\n[Query a database](https://developers.notion.com/reference/post-database-query)-\u003e `QueryDatabase`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudifa%2Fgo-notion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frudifa%2Fgo-notion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudifa%2Fgo-notion/lists"}