Notion isn't just a note-taking app — it has a full REST API that lets you create pages, query databases, manage content, and build automations. The free tier gives you everything you need.
Here's how to start using it in under 5 minutes.
Get Your Free API Key
- Go to developers.notion.com
- Click "Create new integration"
- Give it a name, select your workspace
- Copy your Internal Integration Token (starts with
ntn_)
Then share your Notion database/page with the integration (click "..." → "Connections" → add your integration).
1. Query a Database
This is the most powerful endpoint. You can filter, sort, and paginate through any Notion database.
curl -X POST "https://api.notion.com/v1/databases/YOUR_DATABASE_ID/query" \
-H "Authorization: Bearer ntn_YOUR_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"property": "Status",
"select": { "equals": "Done" }
},
"sorts": [{ "property": "Created", "direction": "descending" }]
}'
2. Create a Page
Add a new entry to any database programmatically.
curl -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer ntn_YOUR_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"parent": { "database_id": "YOUR_DATABASE_ID" },
"properties": {
"Name": { "title": [{ "text": { "content": "New Task" } }] },
"Status": { "select": { "name": "In Progress" } },
"Priority": { "select": { "name": "High" } }
}
}'
3. Search Across Your Workspace
Find any page or database by title.
curl -X POST "https://api.notion.com/v1/search" \
-H "Authorization: Bearer ntn_YOUR_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{ "query": "meeting notes" }'
4. Python Example — CRM Dashboard
import requests
NOTION_TOKEN = "ntn_YOUR_TOKEN"
DATABASE_ID = "YOUR_DATABASE_ID"
headers = {
"Authorization": f"Bearer {NOTION_TOKEN}",
"Notion-Version": "2022-06-28",
"Content-Type": "application/json"
}
def get_all_contacts():
url = f"https://api.notion.com/v1/databases/{DATABASE_ID}/query"
response = requests.post(url, headers=headers, json={
"sorts": [{"property": "Last Contact", "direction": "descending"}]
})
results = response.json().get("results", [])
for item in results[:5]:
props = item["properties"]
name = props.get("Name", {}).get("title", [{}])[0].get("plain_text", "N/A")
print(f"Contact: {name}")
get_all_contacts()
5. Node.js Example — Auto-Create Tasks
const NOTION_TOKEN = "ntn_YOUR_TOKEN";
const DATABASE_ID = "YOUR_DATABASE_ID";
async function createTask(title, status = "To Do") {
const res = await fetch("https://api.notion.com/v1/pages", {
method: "POST",
headers: {
"Authorization": `Bearer ${NOTION_TOKEN}`,
"Notion-Version": "2022-06-28",
"Content-Type": "application/json",
},
body: JSON.stringify({
parent: { database_id: DATABASE_ID },
properties: {
Name: { title: [{ text: { content: title } }] },
Status: { select: { name: status } },
},
}),
});
const data = await res.json();
console.log(`Created: ${data.id}`);
}
createTask("Review pull requests", "In Progress");
Rate Limits
| Tier | Limit |
|---|---|
| Free integration | 3 requests/second |
| Average page size | ~1 KB response |
The free tier handles most automation use cases without issues.
What You Can Build
- Personal CRM — track contacts, meetings, follow-ups
- Content calendar — auto-populate from RSS feeds or social media
- Project dashboard — pull Notion tasks into a custom frontend
- Daily standup bot — create standup entries automatically
- Invoice tracker — manage invoices with auto-status updates
More Free API Articles
- NASA Has a Free API — Mars Rover Photos and Asteroid Data
- CoinGecko Has a Free API — Get Crypto Prices Without a Key
- Open-Meteo Has a Free Weather API — No Key, No Signup
Need Web Data? Try These Tools
If you're building apps that need web scraping or data extraction, check out my ready-made tools on Apify Store — scrapers for Reddit, YouTube, Google News, Trustpilot, and 80+ more. No coding needed, just run and get your data.
Need a custom scraping solution? Email me at spinov001@gmail.com
More Free APIs You Should Know About
- 30+ Free APIs Every Developer Should Bookmark
- Mapbox Has a Free API
- Claude AI Has a Free API
- SendGrid Has a Free API
- Vercel Has a Free API
- Firebase Has a Free API
- Supabase Has a Free API
- OpenAI Has a Free API
- Twilio Has a Free API
- Stripe Has a Free API
- GitHub API Has a Free API
Need custom data scraping? Email me or check my Apify actors.
Top comments (0)