Skip to main content
Workspace and knowledge management API for searching, creating, and updating pages, databases, and blocks in Notion. Best for workflows that need to read or write structured content — project boards, wikis, meeting notes, and knowledge bases. Unlike Google Workspace (document-centric), Notion’s API exposes a database-like structure where pages have typed properties. 7 example endpoints available through Lava’s AI Gateway. See the Notion API docs for full documentation.
This provider requires your own credentials — connect your API key or OAuth account before use.
This is a catch-all provider — any valid URL under https://api.notion.com/v1 is supported. Notion REST API. Construct URLs as https://api.notion.com/v1/{path}. Lava serializes your structured body_json and injects the required Notion-Version header for you — never hand-write or escape JSON, and nested rich_text/annotations are fine. Create a page in ONE call: POST /v1/pages with parent ({ “page_id”: id } for a subpage, or { “type”: “data_source_id”, “data_source_id”: id } for a database row), properties (the title), and an optional inline children[] array (up to 100 blocks) — a separate append step is NOT required. For more than 100 blocks or to add content later, append with PATCH /v1/blocks/{block_id}/children (a page_id works as the block_id; 100 blocks max per call). A rich_text item is { “type”: “text”, “text”: { “content”: ”…” } }; annotations is optional (omit it for default styling) — real 400s come from text content over 2000 chars, an invalid color enum, or a wrong block shape, not from “JSON complexity.” This API version (2025-09-03+) uses data sources: query a database via POST /v1/data_sources/{data_source_id}/query (the old /v1/databases/{id}/query returns 400), and find ids with POST /v1/search using filter {“property”:“object”,“value”:“data_source”} or {“property”:“object”,“value”:“page”}. See https://developers.notion.com/reference. The endpoints below are curated examples.

Endpoints

Search the pages and databases shared with the integration by title. Pass {“query”:“term”} for text search, or narrow by object type with filter {“property”:“object”,“value”:“page”} or {“property”:“object”,“value”:“data_source”} (“database” is rejected on this API version). Use the data_source filter to find a data_source_id for querying a database.

POST https://api.notion.com/v1/search — Free
const data = await lava.gateway('https://api.notion.com/v1/search', { body: {"query":"your search term"} });

Query a database’s rows. On this API version (2025-09-03+) a database is queried through its data_source_id, not the database id — POST /v1/databases/{id}/query returns 400. Get a data_source_id from POST /v1/search with filter {“property”:“object”,“value”:“data_source”}, or from a database object’s data_sources[] array. Optional body: filter, sorts, page_size, start_cursor.

POST https://api.notion.com/v1/data_sources/{data_source_id}/query — Free
const data = await lava.gateway('https://api.notion.com/v1/data_sources/{data_source_id}/query', { body: {} });

Retrieve a page

GET https://api.notion.com/v1/pages/{page_id} — Free
const data = await lava.gateway('https://api.notion.com/v1/pages/{page_id}', { method: 'GET' });

Create a page in ONE call — pass parent, properties (the title), and an optional inline children[] array of content blocks (up to 100); no separate append step is needed. For a subpage use parent { “page_id”: id } with a title property; for a database row use parent { “type”: “data_source_id”, “data_source_id”: id } with properties matching that data source’s schema. Add annotations to a rich_text run for styling (optional); content over 2000 chars per text run is the common cause of a 400.

POST https://api.notion.com/v1/pages — Free
const data = await lava.gateway('https://api.notion.com/v1/pages', {
  body: {
"parent": {
  "page_id": "{parent_page_id}"
},
"properties": {
  "title": {
    "title": [
      {
        "text": {
          "content": "New page"
        }
      }
    ]
  }
},
"children": [
  {
    "object": "block",
    "type": "heading_2",
    "heading_2": {
      "rich_text": [
        {
          "type": "text",
          "text": {
            "content": "Overview"
          }
        }
      ]
    }
  },
  {
    "object": "block",
    "type": "paragraph",
    "paragraph": {
      "rich_text": [
        {
          "type": "text",
          "text": {
            "content": "A line with "
          }
        },
        {
          "type": "text",
          "text": {
            "content": "bold"
          },
          "annotations": {
            "bold": true
          }
        },
        {
          "type": "text",
          "text": {
            "content": " text."
          }
        }
      ]
    }
  },
  {
    "object": "block",
    "type": "bulleted_list_item",
    "bulleted_list_item": {
      "rich_text": [
        {
          "type": "text",
          "text": {
            "content": "First item"
          }
        }
      ]
    }
  }
]
},
});

Append content blocks (paragraphs, headings, lists, dividers, etc.) to a page or block — up to 100 per call. The {block_id} can be a page_id, since pages are blocks. You usually do NOT need this to create a page (POST /v1/pages accepts an inline children[] array); use it for more than 100 blocks or to add content to an existing page.

PATCH https://api.notion.com/v1/blocks/{block_id}/children — Free
const data = await lava.gateway('https://api.notion.com/v1/blocks/{block_id}/children', {
  method: 'PATCH',
  body: {
"children": [
  {
    "object": "block",
    "type": "heading_2",
    "heading_2": {
      "rich_text": [
        {
          "type": "text",
          "text": {
            "content": "Section"
          }
        }
      ]
    }
  },
  {
    "object": "block",
    "type": "paragraph",
    "paragraph": {
      "rich_text": [
        {
          "type": "text",
          "text": {
            "content": "A paragraph of content."
          }
        }
      ]
    }
  }
]
},
});

Update page properties

PATCH https://api.notion.com/v1/pages/{page_id} — Free
const data = await lava.gateway('https://api.notion.com/v1/pages/{page_id}', { method: 'PATCH', body: {"properties":{"Status":{"select":{"name":"Done"}}}} });

Delete a block

DELETE https://api.notion.com/v1/blocks/{block_id} — Free
const data = await lava.gateway('https://api.notion.com/v1/blocks/{block_id}', { method: 'DELETE' });

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests