Open Library Search.json API

The Search.json API from Open Library — 1 operation(s) for search.json.

OpenAPI Specification

open-library-search-json-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Open Library Authors Search.json API
  description: 'Open Library''s public, read-only REST API for searching books, authors,

    and works, retrieving structured records (works, editions, authors,

    subjects), fetching cover images, and pulling recent changes. No

    authentication is required; clients are expected to send a descriptive

    `User-Agent` header to receive a higher per-second rate limit.

    '
  version: 1.0.0
  contact:
    name: Open Library Developer Documentation
    url: https://openlibrary.org/developers/api
servers:
- url: https://openlibrary.org
  description: Open Library production
- url: https://covers.openlibrary.org
  description: Open Library covers service
tags:
- name: Search.json
paths:
  /search.json:
    get:
      summary: Search books and works
      description: Solr-backed search across the Open Library catalog.
      parameters:
      - name: q
        in: query
        description: Solr query string.
        schema:
          type: string
      - name: fields
        in: query
        schema:
          type: string
      - name: sort
        in: query
        schema:
          type: string
          enum:
          - new
          - old
          - random
          - key
          - relevance
      - name: lang
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: integer
      - name: limit
        in: query
        schema:
          type: integer
      - name: offset
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/SearchResults'
      tags:
      - Search.json
components:
  responses:
    SearchResults:
      description: Paginated search results.
      content:
        application/json:
          schema:
            type: object
            properties:
              start:
                type: integer
              num_found:
                type: integer
              docs:
                type: array
                items:
                  type: object
                  additionalProperties: true