{"id":13907780,"url":"https://github.com/YiHeCN/notion-java-sdk","last_synced_at":"2025-07-18T06:31:16.127Z","repository":{"id":151795448,"uuid":"603777600","full_name":"YiHeCN/notion-java-sdk","owner":"YiHeCN","description":"An Unofficial Java SDK for Notion","archived":true,"fork":false,"pushed_at":"2024-03-08T07:12:39.000Z","size":211,"stargazers_count":52,"open_issues_count":0,"forks_count":16,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-11-25T16:39:13.312Z","etag":null,"topics":["java","notion","notion-api","sdk","unofficial-library"],"latest_commit_sha":null,"homepage":"","language":"Java","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/YiHeCN.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}},"created_at":"2023-02-19T14:51:11.000Z","updated_at":"2024-11-06T13:44:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9d2c237-d40e-48e8-9964-32d18ac5c16a","html_url":"https://github.com/YiHeCN/notion-java-sdk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/YiHeCN/notion-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiHeCN%2Fnotion-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiHeCN%2Fnotion-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiHeCN%2Fnotion-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiHeCN%2Fnotion-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YiHeCN","download_url":"https://codeload.github.com/YiHeCN/notion-java-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiHeCN%2Fnotion-java-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265710541,"owners_count":23815375,"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":["java","notion","notion-api","sdk","unofficial-library"],"created_at":"2024-08-06T23:02:10.199Z","updated_at":"2025-07-18T06:31:15.798Z","avatar_url":"https://github.com/YiHeCN.png","language":"Java","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Notion Java SDK\n\n![https://img.shields.io/badge/license-MIT-blue](https://img.shields.io/badge/license-MIT-blue)\n![https://img.shields.io/github/commit-activity/m/YiHeCN/notion-java-sdk](https://img.shields.io/github/commit-activity/m/YiHeCN/notion-java-sdk)\n![https://img.shields.io/badge/Maven-0.0.1--SNAPSHOT-lightgrey](https://img.shields.io/badge/Maven-0.0.1--SNAPSHOT-lightgrey)\n![https://img.shields.io/github/forks/YiHeCN/notion-java-sdk?style=social](https://img.shields.io/github/forks/YiHeCN/notion-java-sdk?style=social)\n![https://img.shields.io/github/stars/YiHeCN/notion-java-sdk?style=social](https://img.shields.io/github/stars/YiHeCN/notion-java-sdk?style=social)\n\nNotion-java-sdk is a java version of [Notion API](https://developers.notion.com/).\n\nIt provides:\n1. Basic packaging of Notion objects (`com._2lazy2name.notion.entity`)\n2. Basic API request (`com._2lazy2name.notion.Notion`)\n\n## Things to Aware\n\nBasic entities and API requests are checked, but not guaranteed safe to use.\n\nThe API is based on the API Version of ***2022-06-28***, which is the latest version on Feb 19, 2023. Future updates are **NOT** guaranteed, which also means Notion Version in headers is not configurable before a new release.\n\n## Compatibility\n\nThe project is written on the source level of **Java 17**. Since enhanced switch blocks are used somewhere, the minimum version accepted is **Java 14**. All you need to change to make it compatible with Java 8 is two switch blocks in `FilterSerializer`.\n\n# How to use it?\n\n1. Add dependency in `pom.xml`\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.2lazy2name\u003c/groupId\u003e\n  \u003cartifactId\u003enotion-java-sdk\u003c/artifactId\u003e\n  \u003cversion\u003ev0.1.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n1. Instantiated `Notion.class`\n    1. If you are using Spring-Framework:\n\n        ```java\n        @Bean\n        Notion notion() {\n            Notion notion = new Notion(NOTION_TOKEN);\n            return notion;\n        }\n        ```\n\n    2. If you are using vanilla Java, Simply use the constructor:\n\n        ```java\n        Notion notion = new Notion(NOTION_TOKEN);\n        ```\n\n2. All the official endpoints are provided in `Notion.class` as methods. There are properly annotated and linked to official notion documents.\n3. If you believe there is an error with this project:\n    1. For `IOException`: use `notion.setDebugEnabled(true)` , and attach Http request details in the issue.\n    2. For `JsonParsingException` : provide the fields value of the object type that you are dealing with in the issue.\n\n# Lib used\n\n[Jackson](https://github.com/FasterXML/jackson) and [Apache Http Client5](https://github.com/apache/httpcomponents-client).\n\n# Future Plan\n1. Make it compatible to Java 8.\n2. Add more tests. (Well, maybe when I encounter some bugs.)\n3. Update to the latest version of Notion API.\n\n# Issue and Contact\n\nI don’t check GitHub very often. For any issues or commit, there are some ways to quicker notices and solutions:\n\n1.  E-mail **yi@2lazy2name.com**\n2. [Notion Page](https://www.notion.so/Notion-java-sdk-bc362b42ae3f40179962425be015962f) - Check the test cases for usage.\n3.  [Telegram Group](https://t.me/+35eZF98AgogxMjJl)\n\nSuggestions in code styles and implementation with optimization advice are highly welcomed.\n\n# Disclaimer\n\nThis Repository is **NOT** provided by Notion and **NOT** endorsed by Notion. There are also some potential bugs and performance issues. **THINK whether you are OK for the risk before you really use it.**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYiHeCN%2Fnotion-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYiHeCN%2Fnotion-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYiHeCN%2Fnotion-java-sdk/lists"}