{
  "openapi": "3.1.0",
  "info": {
    "title": "Dictionary API",
    "version": "1.0.0",
    "description": "Definitions and examples for 155,000 English words, grouped by part of speech, from WordNet 3.1.\n\nEnglish definitions with usage examples for about 155,000 words, grouped by part of speech and ordered by how common each sense is, from Princeton WordNet 3.1. One call per word, self-hosted, no third-party service.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/dictionary.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/dictionary"
  },
  "servers": [
    {
      "url": "https://api-dictionary.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Dictionary API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/define/{word}": {
      "get": {
        "operationId": "defineWord",
        "summary": "Define Word",
        "description": "Define Word endpoint of the Dictionary API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/dictionary/define-word"
        },
        "parameters": [
          {
            "name": "word",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "dog"
          },
          {
            "name": "pos",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "noun"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "word": "dog",
                  "definition_count": 8,
                  "parts_of_speech": [
                    "noun",
                    "verb"
                  ],
                  "definitions": {
                    "noun": [
                      {
                        "sense": 1,
                        "definition": "a member of the genus Canis (probably descended from the common wolf) that has been domesticated by man since prehistoric times; occurs in many breeds",
                        "examples": [
                          "the dog barked all night"
                        ]
                      },
                      {
                        "sense": 3,
                        "definition": "informal term for a man",
                        "examples": [
                          "you lucky dog"
                        ]
                      }
                    ]
                  },
                  "source": "Princeton WordNet 3.1"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 2 tokens per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}