懒人批量查生词(DictGPT)

懒人批量查生词(DictGPT) · GPT アクション

Dictionary API

API for getting word definitions

  • GET /entries/en/{word}Get word definitions

    Retrieve definitions, phonetics, origin, and part of speech for a given English word

元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "Dictionary API",
    "version": "1.0.0",
    "description": "API for getting word definitions"
  },
  "servers": [
    {
      "url": "https://api.dictionaryapi.dev/api/v2"
    }
  ],
  "paths": {
    "/entries/en/{word}": {
      "get": {
        "operationId": "GetWord",
        "summary": "Get word definitions",
        "description": "Retrieve definitions, phonetics, origin, and part of speech for a given English word",
        "parameters": [
          {
            "name": "word",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The word to get definitions for"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WordDefinition"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Word not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WordDefinition": {
        "type": "object",
        "properties": {
          "word": {
            "type": "string"
          },
          "phonetic": {
            "type": "string"
          },
          "phonetics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Phonetic"
            }
          },
          "origin": {
            "type": "string"
          },
          "meanings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Meaning"
            }
          }
        }
      },
      "Phonetic": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "audio": {
            "type": "string"
          }
        }
      },
      "Meaning": {
        "type": "object",
        "properties": {
          "partOfSpeech": {
            "type": "string"
          },
          "definitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Definition"
            }
          }
        }
      },
      "Definition": {
        "type": "object",
        "properties": {
          "definition": {
            "type": "string"
          },
          "example": {
            "type": "string"
          },
          "synonyms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "antonyms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}