Official Dictionary SDKs
Integrate powerful language intelligence, definitions, and translations into your applications with our officially maintained client libraries.
v3.2.1 Stable
RESTful API
Type Safe
Async Support
Node.js & Browser Support
The JavaScript SDK works seamlessly in Node.js 18+ and modern browsers. Supports ESM and CommonJS.
Installation
bash
# Using npm
npm install @dictionary/sdk
# Using yarn
yarn add @dictionary/sdk
# Using pnpm
pnpm add @dictionary/sdk
Basic Usage
javascript
import { DictionaryClient } from "@dictionary/sdk";
// Initialize client with API key
const client = new DictionaryClient({
apiKey: process.env.DICTIONARY_API_KEY,
environment: "sandbox" // or "production"});
// Look up a word
const result = await client.words.define("ephemeral", {
lang: "en",
include: ["synonyms", "pronunciation"]
});
console.log(result.definitions[0].text);
// "lasting for a very short time; transitory"
Python 3.9+ Required
Supports both sync and async usage with
asyncio. Full type hints included.Installation
bash
pip install dictionary-sdk
Basic Usage
python
import dictionary_sdk
from dictionary_sdk import AsyncClient
# Synchronous usage
client = dictionary_sdk.Client(api_key="your_api_key")
result = client.words.define("serendipity", lang="en")
print(result.definitions[0].text)
# Async usage
async def main():
client = AsyncClient(api_key="your_api_key")
result = await client.words.define("ubiquitous", lang="en")
print(result.phonetics[0].text)
asyncio.run(main())
Installation
bash
go get github.com/dictionary-go/sdk/v3
Basic Usage
go
package main
import (
"fmt"
"log"
"github.com/dictionary-go/sdk/v3"
)
func main() {
client := sdk.New(sdk.WithAPIKey("your_api_key"))
resp, err := client.Words.Define(context.Background(), "resilience", &sdk.DefineParams{
Lang: "en",
Include: []sdk.IncludeType{sdk.IncludeSynonyms, sdk.IncludeEtymology},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", resp.Definitions[0].Text)
}
Installation
xml (Maven)
<dependency>
<groupId>com.dictionary.sdk</groupId>
<artifactId>dictionary-java</artifactId>
<version>3.2.1</version>
</dependency>
Basic Usage
java
import com.dictionary.sdk.*;
import com.dictionary.sdk.model.*;
public class Example {
public static void main(String[] args) {
DictionaryClient client = new DictionaryClient(
System.getenv("DICTIONARY_API_KEY")
);
WordResponse response = client.words().define(
"eloquent",
new DefineParams().lang("en").include(Arrays.asList("examples"))
);
System.out.println(response.getDefinitions().get(0).getText());
}
}
Installation
bash
composer require dictionary/sdk-php
Basic Usage
php
<?php
require_once "vendor/autoload.php";
use Dictionary\DictionaryClient;
use Dictionary\Exceptions\SdkException;
$client = new DictionaryClient(getenv("DICTIONARY_API_KEY"));
try {
$result = $client->words->define("paradigm", [
"lang" => "en",
"include" => ["definitions", "synonyms"]
]);
echo $result->definitions[0]->text;
} catch (SdkException $e) {
echo "Error: {$e->getMessage()}\n";
}
Version Compatibility
We maintain strict semantic versioning across all SDKs. The latest stable release includes breaking change safeguards and migration guides.
| SDK Version | Language | API Version | hStatus | Release Date |
|---|---|---|---|---|
v3.2.1 |
All Languages | v2024-10-15 | Stable | Nov 12, 2024 |
v3.3.0-beta.2 |
Node.js, Python | v2024-12-01-preview | Beta | Dec 1, 2024 |
v2.8.4 |
Legacy Support | v2023-06-20 | Deprecated | Jun 20, 2023 |
Deprecation Notice
SDK v2.x will reach end-of-life on March 1, 2025. Please migrate to v3.x using our automated migration tool.
Need Help?
Our SDKs are open source and actively maintained. Report issues, request features, or join our developer community.