Cognee Schema API

Schema inspection endpoints for a dataset's derived schema inventory and the caller-wide memory provenance graph.

Operations 3

GET /api/v1/schema/inventory Schema Inventory #
GET /api/v1/schema/provenance Schema Provenance #
GET /api/v1/schema/provenance/json Schema Provenance Json #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cognee:cognee-schema-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cognee-schema-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cognee Schema API
  description: Cognee API with Bearer token and Cookie auth
  version: 1.0.0
servers:
- url: https://{tenant}.aws.cognee.ai
  description: 'Cognee Cloud: your tenant pod, named in the platform.cognee.ai dashboard'
  variables:
    tenant:
      default: your-tenant
      description: Your tenant name, shown in the Cognee Cloud dashboard
- url: http://localhost:8000
  description: 'Self-hosted: a locally running cognee server'
security:
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: Schema
  description: Schema inspection endpoints for a dataset's derived schema inventory and the caller-wide memory provenance graph.
paths:
  /api/v1/schema/inventory:
    get:
      tags:
      - Schema
      summary: Schema Inventory
      description: 'Return the data-derived schema inventory for an authorized dataset.


        Summarizes the knowledge graph by semantic type: per-type instance

        counts, representative sample names, and the per-pair relationship

        distribution. Wraps the ``get_schema_inventory`` SDK function so it

        is accessible over HTTP with an OpenAPI response schema.


        Query parameters:

        dataset_id: dataset UUID to scope the graph databases.

        samples_per_type: max sample instance names per type (default 5).

        sort: ``"count"`` (default) orders types by descending count;

        ``"none"`` preserves discovery order.'
      operationId: schema_inventory_api_v1_schema_inventory_get
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - name: dataset_id
        in: query
        required: true
        schema:
          type: string
          format: uuid
          description: Dataset UUID to scope the graph databases. List your datasets via GET /api/v1/datasets to find it.
          examples:
          - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          title: Dataset Id
        description: Dataset UUID to scope the graph databases. List your datasets via GET /api/v1/datasets to find it.
      - name: samples_per_type
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 5
          title: Samples Per Type
      - name: sort
        in: query
        required: false
        schema:
          type: string
          description: 'Sort order: ''count'' (default) orders types by descending instance count; ''none'' preserves discovery order. Other values are rejected.'
          examples:
          - count
          default: count
          title: Sort
        description: 'Sort order: ''count'' (default) orders types by descending instance count; ''none'' preserves discovery order. Other values are rejected.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SchemaInventoryItem'
                title: Response Schema Inventory Api V1 Schema Inventory Get
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cognee__api__v1__visualize__routers__get_schema_router__ErrorResponse'
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cognee__api__v1__visualize__routers__get_schema_router__ErrorResponse'
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/schema/provenance:
    get:
      tags:
      - Schema
      summary: Schema Provenance
      description: 'Return a caller-scoped HTML memory-provenance visualization.


        A tenant administrator sees the whole workspace; any other member sees

        only the datasets they hold a read grant on, and the files, grants,

        agents and sessions hanging off them (see ``_provenance_scope``).


        Query parameters:

        include_memory: when true, also folds the extracted memory

        (entities/relationships) into the provenance view alongside

        data lineage (default false).'
      operationId: schema_provenance_api_v1_schema_provenance_get
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - name: include_memory
        in: query
        required: false
        schema:
          type: boolean
          description: When true, include the extracted memory subgraph (entities/relationships) in the provenance visualization.
          default: false
          title: Include Memory
        description: When true, include the extracted memory subgraph (entities/relationships) in the provenance visualization.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cognee__api__v1__visualize__routers__get_schema_router__ErrorResponse'
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/schema/provenance/json:
    get:
      tags:
      - Schema
      summary: Schema Provenance Json
      description: 'Return a caller-scoped memory-provenance graph as a JSON-safe dict.


        Same scoping as `GET /schema/provenance` (the whole tenant for its

        administrators, the caller''s readable datasets for anyone else,

        tenant or not) and the same underlying graph —

        packaged as a dict instead of an HTML page.


        Query parameters:

        include_memory: when true, also folds the extracted memory

        (entities/relationships) into the payload alongside data

        lineage (default false).'
      operationId: schema_provenance_json_api_v1_schema_provenance_json_get
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - name: include_memory
        in: query
        required: false
        schema:
          type: boolean
          description: When true, include the extracted memory subgraph (entities/relationships) in the provenance payload.
          default: false
          title: Include Memory
        description: When true, include the extracted memory subgraph (entities/relationships) in the provenance payload.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cognee__api__v1__visualize__routers__get_schema_router__ErrorResponse'
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SchemaInventoryItem:
      properties:
        type:
          anyOf:
          - type: string
          - type: 'null'
          title: Type
          description: Semantic type name.
        count:
          type: integer
          minimum: 0.0
          title: Count
          description: Total number of instances of this type.
        samples:
          items:
            anyOf:
            - type: string
            - type: 'null'
          type: array
          title: Samples
          description: Representative instance names.
        sample_size:
          type: integer
          minimum: 0.0
          title: Sample Size
          description: Number of returned samples.
        relationships:
          items:
            $ref: '#/components/schemas/SchemaInventoryRelationship'
          type: array
          title: Relationships
          description: Relationship aggregates involving this semantic type.
      type: object
      required:
      - count
      - sample_size
      title: SchemaInventoryItem
      description: Per-semantic-type inventory row returned by /schema/inventory.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    cognee__api__v1__visualize__routers__get_schema_router__ErrorResponse:
      properties:
        error:
          type: string
          title: Error
      type: object
      required:
      - error
      title: ErrorResponse
      description: Generic API error response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    SchemaInventoryRelationship:
      properties:
        to_type:
          anyOf:
          - type: string
          - type: 'null'
          title: To Type
          description: Target semantic type for this relationship aggregate.
        relation:
          type: string
          title: Relation
          description: Relationship name.
        count:
          type: integer
          minimum: 0.0
          title: Count
          description: Number of matching relationships.
      type: object
      required:
      - relation
      - count
      title: SchemaInventoryRelationship
      description: Relationship aggregate from one semantic type to another.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    CookieAuth:
      type: apiKey
      in: cookie
      name: auth_token
x-provenance:
  method: harvested
  publisher: Cognee
  source: https://docs.cognee.ai/cognee_openapi_spec.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)