api-ninjas-com Quotes API

The Quotes API provides tens of thousands of carefully curated, aphoristic quotes from famous people throughout history. All quotes are pre-vetted and pre-processed by our data team to ensure quality and selected specifically for their memorable and thought-provoking nature.

Operations 4

GET /v2/quotes Get quotes with pagination support (deterministic order) #
GET /v2/randomquotes Get random quotes #
GET /v2/quoteoftheday Get today's quote (same quote all day) #
GET /v2/quoteauthors Get list of authors with multiple aphoristic quotes (premium only) #

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/api-ninjas-com:api-ninjas-com-quotes-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

api-ninjas-com-quotes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ninjas Quotes API
  description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
  version: 1.0.0
  contact:
    name: API Ninjas
    url: https://api-ninjas.com
  license:
    name: Proprietary
servers:
- url: https://api.api-ninjas.com
  description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: Quotes
  description: The Quotes API provides tens of thousands of carefully curated, aphoristic quotes from famous people throughout history. All quotes are pre-vetted and pre-processed by our data team to ensure quality and selected specifically for their memorable and thought-provoking nature.
paths:
  /v2/quotes:
    get:
      summary: Get quotes with pagination support (deterministic order)
      description: Returns quotes in a deterministic, paginated order, filterable by category, author or work title. For a random selection instead use /randomquotes.
      operationId: getQuotes
      tags:
      - Quotes
      parameters:
      - name: categories
        in: query
        description: 'Comma-separated list of categories to include in results (results will match all of the categories). Example: categories=wisdom,success'
        required: false
        schema:
          type: string
      - name: exclude_categories
        in: query
        description: 'Comma-separated list of categories to exclude from results (results will not match any of the categories). Example: exclude_categories=love,philosophy'
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: 'Filter quotes by author name (partial match supported). Example: author=Einstein'
        required: false
        schema:
          type: string
      - name: work
        in: query
        description: 'Filter quotes by work title (partial match supported). Example: work=War'
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of results to return. Must be between 1 and 100. Default is 1. Premium only.
        required: false
        schema:
          type: integer
          default: 1
          minimum: 1
          maximum: 100
      - name: offset
        in: query
        description: Number of results to skip for pagination. Default is 0. Premium only.
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - $ref: '#/components/parameters/QuotesOpenapi_safe'
      responses:
        '200':
          $ref: '#/components/responses/QuoteResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - ApiKeyAuth: []
  /v2/randomquotes:
    get:
      summary: Get random quotes
      description: Returns randomly chosen quotes, optionally filtered by category, author or work title. For stable paginated results use /quotes; for one fixed daily quote use /quoteoftheday.
      operationId: getRandomQuotes
      tags:
      - Quotes
      parameters:
      - name: categories
        in: query
        description: 'Comma-separated list of categories to include in results (results will match all of the categories). Example: categories=wisdom,success'
        required: false
        schema:
          type: string
      - name: exclude_categories
        in: query
        description: 'Comma-separated list of categories to exclude from results (results will not match any of the categories). Example: exclude_categories=love,philosophy'
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: 'Filter quotes by author name (partial match supported). Example: author=Einstein'
        required: false
        schema:
          type: string
      - name: work
        in: query
        description: 'Filter quotes by work title (partial match supported). Example: work=War'
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of random results to return. Must be between 1 and 100. Default is 1. Premium only.
        required: false
        schema:
          type: integer
          default: 1
          minimum: 1
          maximum: 100
      - $ref: '#/components/parameters/QuotesOpenapi_safe'
      responses:
        '200':
          $ref: '#/components/responses/QuoteResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - ApiKeyAuth: []
  /v2/quoteoftheday:
    get:
      summary: Get today's quote (same quote all day)
      description: Returns a single quote of the day that stays the same for the whole day. Takes no parameters. For varying quotes use /randomquotes or /quotes.
      operationId: getQuoteOfTheDay
      tags:
      - Quotes
      responses:
        '200':
          $ref: '#/components/responses/QuoteResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - ApiKeyAuth: []
  /v2/quoteauthors:
    get:
      summary: Get list of authors with multiple aphoristic quotes (premium only)
      description: Lists authors who have multiple aphoristic quotes in the database, with limit and offset paging. Requires a premium subscription.
      operationId: getQuoteAuthors
      tags:
      - Quotes
      parameters:
      - name: limit
        in: query
        description: Maximum number of authors to return. Must be between 1 and 500. Default is 100.
        required: false
        schema:
          type: integer
          default: 100
          minimum: 1
          maximum: 500
      - name: offset
        in: query
        description: Number of authors to skip. Used for pagination. Default is 0.
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - ApiKeyAuth: []
components:
  responses:
    QuoteResponse:
      description: A successful response containing one or more quotes.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Quote'
    ErrorResponse:
      description: An error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QuotesOpenapi_Error'
  schemas:
    Quote:
      type: object
      properties:
        quote:
          type: string
          description: The quote text.
        author:
          type: string
          description: The author of the quote.
        work:
          type: string
          description: The work/book from which the quote originates.
        categories:
          type: array
          items:
            type: string
          description: Array of categories associated with the quote.
      required:
      - quote
      - author
    QuotesOpenapi_Error:
      type: object
      properties:
        message:
          type: string
          description: Error message describing the failure.
  parameters:
    QuotesOpenapi_safe:
      name: safe
      in: query
      description: Premium subscribers only. Set safe=true to exclude quotes flagged as sexually explicit, crude, or containing profanity, slurs, or offensive content. Defaults to false, so results are unfiltered unless you opt in. Any value other than true/false returns an error, as does using this parameter on a free account.
      required: false
      schema:
        type: boolean
        default: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api