| Crates.io | notionrs |
| lib.rs | notionrs |
| version | 0.3.0 |
| created_at | 2024-10-22 19:22:04.968679+00 |
| updated_at | 2025-09-14 01:05:22.913238+00 |
| description | A Notion API client that provides type-safe request serialization and response deserialization |
| homepage | |
| repository | https://github.com/46ki75/notionrs |
| max_upload_size | |
| id | 1419149 |
| size | 291,841 |

notionrs now supports Notion-Version: 2025-09-03.
This project is currently under active development and is not yet ready for production use. Features and API stability may change without notice. Contributions and feedback are welcome!
As part of the alpha release, the following features are available. Please note that API changes may occur before the official release.
Below is a basic example.
Cargo.toml:
notionrs = { version = "0" }
notionrs_types = { version = "0" }
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
src/main.rs:
use notionrs::Client;
use notionrs_types::prelude::*;
use serde::{Deserialize, Serialize};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let notion_api_key = std::env::var("NOTION_TOKEN").unwrap();
let client = Client::new(notion_api_key);
let filter = Filter::timestamp_past_month();
let sort = Sort::desc("Created Time");
let request = client
.query_data_source()
.data_source_id("DATA_SOURCE_ID")
.filter(filter)
.sorts(vec![sort]);
#[derive(Debug, Clone, Serialize, Deserialize)]
struct MyProperties {
#[serde(rename = "My Title")]
pub title: PageTitleProperty,
}
let response = request.send::<MyProperties>().await?;
for page in response.results {
println!("{}", page.properties.title.to_string());
}
Ok(())
}