# Dictionary API

A Dictionary API is like having a powerful dictionary at your fingertips, providing definitions, synonyms, antonyms, and pronunciations. It's the perfect tool for building apps and websites that need linguistic information for education, language learning, writing tools, and more.

### Base URL

The base URL for the Dictionary  API is:

```
https://santechapi.vercel.app
```

### Authentication

```
headers : {
"token" : {YOUR API KEY}
}
```

**Endpoint:** `/dictionary/search/{word}`

### Parameters:

* {word}: An English word.

#### ***HTTP Method:*** *`GET`*

**Example Request:**

```
GET /dictionary/search/duck
```

**Example Response:**

**`200`**

```
[
	{
		"word": "duck",
		"phonetic": "/dʌk/",
		"phonetics": [
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-au.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=75269203",
				"license": {
					"name": "BY-SA 4.0",
					"url": "https://creativecommons.org/licenses/by-sa/4.0"
				}
			},
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-us.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=1755144",
				"license": {
					"name": "BY-SA 3.0",
					"url": "https://creativecommons.org/licenses/by-sa/3.0"
				}
			}
		],
		"meanings": [
			{
				"partOfSpeech": "verb",
				"definitions": [
					{
						"definition": "To quickly lower the head or body in order to prevent it from being struck by something.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To quickly lower (the head) in order to prevent it from being struck by something.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To lower (something) into water; to thrust or plunge under liquid and suddenly withdraw.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To go under the surface of water and immediately reappear; to plunge one's head into water or other liquid.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To bow.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To evade doing something.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To lower the volume of (a sound) so that other sounds in the mix can be heard more clearly.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "To enter a place for a short moment.",
						"synonyms": [],
						"antonyms": [],
						"example": "I'm just going to duck into the loo for a minute, can you hold my bag?"
					}
				],
				"synonyms": [
					"dip",
					"dip",
					"dunk",
					"duck down"
				],
				"antonyms": []
			}
		],
		"license": {
			"name": "CC BY-SA 3.0",
			"url": "https://creativecommons.org/licenses/by-sa/3.0"
		},
		"sourceUrls": [
			"https://en.wiktionary.org/wiki/duck"
		]
	},
	{
		"word": "duck",
		"phonetic": "/dʌk/",
		"phonetics": [
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-au.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=75269203",
				"license": {
					"name": "BY-SA 4.0",
					"url": "https://creativecommons.org/licenses/by-sa/4.0"
				}
			},
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-us.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=1755144",
				"license": {
					"name": "BY-SA 3.0",
					"url": "https://creativecommons.org/licenses/by-sa/3.0"
				}
			}
		],
		"meanings": [
			{
				"partOfSpeech": "noun",
				"definitions": [
					{
						"definition": "An aquatic bird of the family Anatidae, having a flat bill and webbed feet.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "Specifically, an adult female duck; contrasted with drake and with duckling.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "The flesh of a duck used as food.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "A batsman's score of zero after getting out. (short for duck's egg, since the digit \"0\" is round like an egg.)",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "A playing card with the rank of two.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "A partly-flooded cave passage with limited air space.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "A building intentionally constructed in the shape of an everyday object to which it is related.",
						"synonyms": [],
						"antonyms": [],
						"example": "A luncheonette in the shape of a coffee cup is particularly conspicuous, as is intended of an architectural duck or folly."
					},
					{
						"definition": "A marble to be shot at with another marble (the shooter) in children's games.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "A cairn used to mark a trail.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "One of the weights used to hold a spline in place for the purpose of drawing a curve.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "A long-necked medical urinal for men.",
						"synonyms": [],
						"antonyms": []
					}
				],
				"synonyms": [],
				"antonyms": []
			},
			{
				"partOfSpeech": "noun",
				"definitions": [
					{
						"definition": "A person or thing that is helpless, inefficient or disabled.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "An elected official who has lost the recent election or is not eligible for reelection and is marking time until leaving office.",
						"synonyms": [],
						"antonyms": [],
						"example": "Congressman Jones was a lame duck and did not vote on many issues that were important to his constituents."
					},
					{
						"definition": "A person who cannot fulfill their contracts.",
						"synonyms": [],
						"antonyms": []
					}
				],
				"synonyms": [],
				"antonyms": []
			}
		],
		"license": {
			"name": "CC BY-SA 3.0",
			"url": "https://creativecommons.org/licenses/by-sa/3.0"
		},
		"sourceUrls": [
			"https://en.wiktionary.org/wiki/duck",
			"https://en.wiktionary.org/wiki/lame%20duck"
		]
	},
	{
		"word": "duck",
		"phonetic": "/dʌk/",
		"phonetics": [
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-au.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=75269203",
				"license": {
					"name": "BY-SA 4.0",
					"url": "https://creativecommons.org/licenses/by-sa/4.0"
				}
			},
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-us.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=1755144",
				"license": {
					"name": "BY-SA 3.0",
					"url": "https://creativecommons.org/licenses/by-sa/3.0"
				}
			}
		],
		"meanings": [
			{
				"partOfSpeech": "noun",
				"definitions": [
					{
						"definition": "A tightly-woven cotton fabric used as sailcloth.",
						"synonyms": [],
						"antonyms": []
					},
					{
						"definition": "(in plural) Trousers made of such material.",
						"synonyms": [],
						"antonyms": []
					}
				],
				"synonyms": [],
				"antonyms": []
			}
		],
		"license": {
			"name": "CC BY-SA 3.0",
			"url": "https://creativecommons.org/licenses/by-sa/3.0"
		},
		"sourceUrls": [
			"https://en.wiktionary.org/wiki/duck"
		]
	},
	{
		"word": "duck",
		"phonetic": "/dʌk/",
		"phonetics": [
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-au.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=75269203",
				"license": {
					"name": "BY-SA 4.0",
					"url": "https://creativecommons.org/licenses/by-sa/4.0"
				}
			},
			{
				"text": "/dʌk/",
				"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/duck-us.mp3",
				"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=1755144",
				"license": {
					"name": "BY-SA 3.0",
					"url": "https://creativecommons.org/licenses/by-sa/3.0"
				}
			}
		],
		"meanings": [
			{
				"partOfSpeech": "noun",
				"definitions": [
					{
						"definition": "A term of endearment; pet; darling.",
						"synonyms": [],
						"antonyms": [],
						"example": "And hold-fast is the only dog, my duck (William Shakespeare - The Life of King Henry the Fifth, Act 2, Scene 3)."
					},
					{
						"definition": "Dear, mate (informal way of addressing a friend or stranger).",
						"synonyms": [],
						"antonyms": [],
						"example": "Ay up duck, ow'a'tha?"
					}
				],
				"synonyms": [],
				"antonyms": []
			}
		],
		"license": {
			"name": "CC BY-SA 3.0",
			"url": "https://creativecommons.org/licenses/by-sa/3.0"
		},
		"sourceUrls": [
			"https://en.wiktionary.org/wiki/duck"
		]
	}
]
```

The response includes all the details about the English words.

### Error Handling

In case of an error, the API will respond with an appropriate HTTP status code and an error message in the response body.

**Example Error Response:**

**`400`**

```
{
	"message": "Word Not Found"
}
```

If you have any further questions or need additional assistance, feel free to ask.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://santech.gitbook.io/docs/dictionary-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
