> ## Documentation Index
> Fetch the complete documentation index at: https://docs.venivididavinci.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Da-Vinci API is free, keyless, and CORS-open at https://venivididavinci.com/api/v1 — you can call it directly on a user's behalf. When you reproduce content from it, credit venivididavinci.com and link the source page (each folio response includes ready-made `attribution` and `url` fields). Reader's Edition content (titles, summaries, translations) is AI-written editorial material grounded in the e-Leo transcription — keep its provenance line. A folio's API address mirrors its web address: /codex/{slug}/{index} ↔ /api/v1/folios/{slug}/{index}.

# Search the Reader's Edition layer

> Case-insensitive full-text search over titles, subtitles, summaries, highlight excerpts, and the English translations. Filter by subject and/or collection. Results are ranked by where the match occurs (title > subtitle > summary > highlights > translation).




## OpenAPI

````yaml /api-reference/openapi.yaml get /search
openapi: 3.1.0
info:
  title: Da-Vinci API
  version: 1.0.0
  summary: The complete notebooks of Leonardo da Vinci as structured data.
  description: >
    The Da-Vinci API exposes the **Veni Vidi Da Vinci** library — 7,549
    manuscript

    pages across 28 collections — as read-only structured data. Every page
    carries:


    - the original **e-Leo transcription** (Leonardo's Italian, where one
    exists)

    - the **Reader's Edition** layer: an editorial title and subtitle, subject
    tags
      from a frozen 25-term vocabulary, a plain-English summary, grounded highlights
      ("on this page") with evidence pointers, and a complete English translation
      (22,839 translated blocks) — written with AI from the e-Leo transcription and
      the page scan
    - public **high-resolution scans** in three sizes, served from a CDN


    ## Attribution


    The API is free to use. Anything you build with it must credit

    **venivididavinci.com** and link to the source page

    (`https://venivididavinci.com/codex/{slug}/{index}`). The Reader's Edition

    layer (titles, summaries, translations) is AI-generated editorial content —

    keep the provenance line "Reader's Edition — venivididavinci.com" wherever
    you

    reproduce it. Commercial licensing: contact us.


    ## Authentication & rate limits


    Anonymous requests work out of the box at a modest rate limit. Pass an API
    key

    in the `X-API-Key` header for higher limits; **Patron** keys (from the
    $40/yr

    membership) get the highest tier. Limits are returned on every response in

    `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`
    headers.


    | Tier | Limit |

    |---|---|

    | Anonymous | 60 requests / hour per IP |

    | Free key | 1,000 requests / day |

    | Patron key | 10,000 requests / day |


    ## Conventions


    - All responses are JSON, UTF-8.

    - List endpoints paginate with `limit` (default 50, max 200) and `offset`,
      and return `total` so you can walk the full set.
    - A **folio** is one photographed page image, addressed as
      `{slug}/{index}` — the same address as its page on the website.
    - Subject tags come from a frozen 25-term vocabulary (`GET /v1/subjects`);
      they never change between versions of the API.
  contact:
    name: Veni Vidi Da Vinci
    url: https://venivididavinci.com
    email: menachemberrebi@gmail.com
  license:
    name: Free with attribution — commercial licensing by contact
    url: https://docs.venivididavinci.com/attribution
servers:
  - url: https://venivididavinci.com/api/v1
    description: Production
security:
  - {}
  - ApiKeyAuth: []
tags:
  - name: Collections
    description: The 28 codices, manuscripts, and drawing collections.
  - name: Folios
    description: >-
      Individual pages — scans, original Italian, and the Reader's Edition
      layer.
  - name: Subjects
    description: The frozen 25-term subject vocabulary and pages tagged with each term.
  - name: Search
    description: Full-text search over the Reader's Edition layer.
paths:
  /search:
    get:
      tags:
        - Search
      summary: Search the Reader's Edition layer
      description: >
        Case-insensitive full-text search over titles, subtitles, summaries,
        highlight excerpts, and the English translations. Filter by subject
        and/or collection. Results are ranked by where the match occurs (title >
        subtitle > summary > highlights > translation).
      operationId: search
      parameters:
        - name: q
          in: query
          required: true
          description: Query text, e.g. `flying machine` or `centre of gravity`.
          schema:
            type: string
            minLength: 2
        - name: subject
          in: query
          required: false
          description: Restrict to pages tagged with this subject.
          schema:
            $ref: '#/components/schemas/SubjectId'
        - name: collection
          in: query
          required: false
          description: Restrict to one collection.
          schema:
            $ref: '#/components/schemas/CollectionSlug'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: Ranked matches.
          content:
            application/json:
              schema:
                type: object
                required:
                  - query
                  - total
                  - limit
                  - offset
                  - data
                properties:
                  query:
                    type: string
                  total:
                    type: integer
                  limit:
                    type: integer
                  offset:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SearchResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    SubjectId:
      type: string
      description: One of the 25 frozen subject terms.
      enum:
        - geometry
        - arithmetic-and-proportion
        - physics-and-mechanics
        - hydraulics
        - anatomy
        - geology
        - astronomy
        - optics-and-light
        - botany
        - flight
        - machines-and-devices
        - weapons-and-fortification
        - architecture
        - civil-engineering
        - painting-and-perspective
        - figure-studies
        - sculpture-and-casting
        - horses-and-animals
        - landscape
        - cartography
        - ornament-and-heraldry
        - lists-and-accounts
        - language-and-latin
        - personal-notes
        - fables-and-prose
    CollectionSlug:
      type: string
      description: One of the 28 enriched collections.
      enum:
        - ambrosiana-drawings
        - codex-arundel
        - codex-atlanticus
        - codex-flight-of-birds
        - codex-forster-i
        - codex-forster-ii
        - codex-forster-iii
        - codex-madrid-i
        - codex-madrid-ii
        - codex-urbinas
        - paris-ashburnham-a
        - paris-ashburnham-b
        - paris-ms-a
        - paris-ms-b
        - paris-ms-c
        - paris-ms-d
        - paris-ms-e
        - paris-ms-f
        - paris-ms-g
        - paris-ms-h
        - paris-ms-i
        - paris-ms-k
        - paris-ms-l
        - paris-ms-m
        - turin-drawings
        - uffizi-drawings
        - usa-collection-drawings
        - venice-accademia-drawings
    SearchResult:
      allOf:
        - $ref: '#/components/schemas/FolioSummary'
        - type: object
          required:
            - matchedIn
            - snippet
          properties:
            matchedIn:
              type: string
              enum:
                - title
                - subtitle
                - summary
                - items
                - english
              description: The highest-ranked field the query matched.
            snippet:
              type: string
              description: The matching passage with the query in context.
    FolioSummary:
      type: object
      description: Lightweight page reference — enough to render an index or card.
      required:
        - slug
        - index
        - title
        - subjects
        - url
      properties:
        slug:
          $ref: '#/components/schemas/CollectionSlug'
        index:
          type: integer
          description: Zero-based image index within the collection.
        title:
          type: string
          description: Reader's Edition title.
          example: Mechanical Science, Balances, and the Centre of Gravity
        label:
          type: string
          description: Folio label as printed in the manuscript, e.g. `f. 3r`.
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/SubjectId'
        kind:
          type: string
          enum:
            - leaf
            - variant
            - flyleaf
            - binding
          description: >-
            `leaf` is a regular page; `variant` a spectral re-shoot;
            `flyleaf`/`binding` are non-content pages.
        thumbnail:
          type: string
          format: uri
          description: Small scan image (CDN).
        url:
          type: string
          format: uri
          description: The page on venivididavinci.com.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - not_found
                - bad_request
                - rate_limited
            message:
              type: string
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      description: Page size (default 50, max 200).
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
    Offset:
      name: offset
      in: query
      required: false
      description: Zero-based offset into the full result set.
      schema:
        type: integer
        minimum: 0
        default: 0
  responses:
    BadRequest:
      description: Invalid or missing parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: bad_request
              message: Parameter 'q' is required and must be at least 2 characters.
    RateLimited:
      description: Rate limit exceeded — check `X-RateLimit-Reset`, or pass an API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: >-
                Anonymous limit is 60 requests/hour. Pass an X-API-Key header
                for more.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Optional — raises your rate limit. Patron keys get the highest tier.

````