Wordly API로 구축하세요.
서버 측 API 키를 사용하고, HTTPS를 요청하고, 예측 가능한 크레딧 기반 청구 모델을 통해 모든 호출을 추적하세요. 이 참조 문서는 현재 프로덕션에서 사용할 수 있는 엔드포인트를 문서화하고 아직 준비 중인 엔드포인트를 명확하게 표시합니다.
빠른 시작
무료 계정을 만들고, 6자리 코드를 사용하여 이메일을 확인하고, 개발자 대시보드에 한 번 표시된 API 키를 복사하세요.
- 1계정 만들기
이메일 주소와 비밀번호만으로 등록하세요.
- 2이메일을 확인하세요
에서 보낸 코드를 입력하세요.
[email protected]. Verification grants 50 free credits. - 3API 키 저장
생성된 것을 복사하세요.
wly_live_...키를 저장하고 서버 측 환경 변수에 보관하세요. - 4테스트 요청하기
계정 엔드포인트를 호출하여 인증을 확인하고 잔액을 확인하세요.
curl "https://api.wordlyenglish.com/v1/account" \
-H "Authorization: Bearer $WORDLY_API_KEY" \
-H "Accept: application/json"{
"data": {
"message": "Authenticated",
"credits_remaining": 50
},
"meta": { "lang": "en" }
}기본 URL 및 버전 관리
모든 프로덕션 엔드포인트는 다음 버전의 기본 URL에서 제공됩니다.
https://api.wordlyenglish.com/v1주요 응답 또는 동작 변경은 새로운 경로 버전을 사용합니다. 추가 필드는 다음에 도입될 수 있습니다. v1, so clients should ignore response properties they do not recognize.
인증
인증된 엔드포인트에는 HTTP에 API 키가 필요합니다. Authorization Bearer 방식을 사용하는 헤더입니다.
Authorization: Bearer wly_live_your_api_key브라우저 JavaScript, 공개 Git 저장소, 스크린샷, 로그 또는 분산 모바일 애플리케이션에 라이브 키를 배치하지 마십시오. 백엔드에서 Wordly API를 호출하고 자신의 애플리케이션이 해당 백엔드와 통신하도록 하세요.
현지화된 API 메시지
다음으로 응답 언어를 설정하세요. ?lang=tr 아니면 표준 Accept-Language 헤더. 쿼리 매개변수가 우선 적용됩니다. 모든 JSON 응답은 선택한 로케일을 선언합니다. Content-Language 그리고 meta.lang. Error codes remain stable in English for programmatic handling; only the human-readable message is localized.
curl "https://api.wordlyenglish.com/v1/account?lang=tr" \
-H "Authorization: Bearer $WORDLY_API_KEY" \
-H "Accept-Language: tr-TR"지원되는 언어 코드: en, tr, de, fr, es, it, pt, nl, pl, ru, uk, ar, fa, he, hi, bn, ur, zh, ja, ko, id, ms, vi, th, sv, no, da, fi, cs, ro.
크레딧 및 청구
Each successful metered request consumes the documented number of credits. Email-verified accounts receive 50 free credits once. Credits are deducted atomically, so concurrent requests cannot spend the same balance twice. Balance lookup through GET /v1/account is free.
| 작동 | 신용 비용 | 가용성 |
|---|---|---|
GET /v1/status | 0 | 라이브 |
GET /v1/account | 0 | 라이브 |
GET /v1/words/{word} | 1–5 | 라이브 |
GET /v1/words/search | 1 | 라이브 |
GET /v1/words/random | 1 per word | 라이브 |
POST /v1/words/batch | 반환된 기록을 기반으로 함 | 라이브 |
Use GET /v1/account when you need the current balance. Other endpoint responses include the operation charge but omit the remaining balance. When the balance is insufficient, the API returns HTTP 402 작업을 처리하지 않습니다.
{
"error": {
"code": "credits_exhausted",
"message": "Your credit balance is exhausted. Add a package or enable pay-as-you-go to continue.",
"upgrade_url": "/app.php?page=billing"
}
}API key lifecycle
개발, 스테이징, 프로덕션을 위한 별도의 키를 만듭니다. Wordly는 각 키의 암호화 해시만 저장합니다. 전체 값은 생성 시 한 번 표시됩니다.
- 환경이나 서비스별로 키 이름을 지정합니다.
- 환경 변수 또는 관리형 비밀 저장소를 사용하세요.
- 키가 노출된 경우 즉시 키를 취소하세요.
- 이전 값을 재사용하지 않고 키를 순환합니다.
- 쿼리 문자열에 키를 보내지 마십시오.
응답 형식
성공적인 응답은 최상위 수준을 사용합니다. data 개체이며 다음을 포함할 수 있습니다. meta 개체. 오류는 항상 최상위 수준을 사용합니다. error 기계가 읽을 수 있는 안정적인 객체 code 그리고 사람이 읽을 수 있는 message.
{
"data": { ... },
"meta": {
"credits_used": 1,
"request_id": "..."
}
}{
"error": {
"code": "invalid_api_key",
"message": "..."
}
}유지 request_id 성공적인 청구 요청에 대해 지원팀에 문의할 때. JSON은 UTF-8로 인코딩되어 클라이언트가 전송해야 합니다. Accept: application/json.
Wordly caches shared vocabulary data on the server, never API keys, account identities, balances, rate-limit state, or request identifiers. Public status and language responses advertise shared-cache lifetimes. Authenticated responses remain private, no-store; applications may cache the stable data value in their own trusted backend when appropriate.
생산 엔드포인트
/v1/status라이브공용 서비스 상태 및 API 버전 정보를 반환합니다. 이 엔드포인트에는 인증이 필요하지 않으며 크레딧 비용이 0입니다.
예시 요청
curl "https://api.wordlyenglish.com/v1/status" \
-H "Accept: application/json"200 · Success
{
"data": { "status": "ok", "version": "v1" },
"meta": { "lang": "en" }
}/v1/accountLive · 0 creditsValidates the supplied key and returns the current account balance without charging a credit.
헤더
| 이름 | 필수 | 설명 |
|---|---|---|
Authorization | 예 | Bearer wly_live_... |
Accept | 추천 | application/json |
응답 헤더
X-Credits-Remaining is returned only by this balance endpoint.
200 · Success
{
"data": { "message": "Authenticated", "credits_remaining": 1250 },
"meta": { "lang": "en" }
}어휘 끝점
모든 기록은 다음을 보고합니다. completeness ~로 catalog, translated, or enriched. Fields that are not available are returned as null 또는 발명된 데이터 대신 빈 개체입니다.
GET /v1/words/{word}
정확한 단어 일치를 반환합니다. 사용 languages=tr,de,fr 요청된 번역만 반환합니다. 카탈로그 또는 번역된 기록의 비용은 1크레딧입니다. 완전히 강화된 프로필의 비용은 5크레딧입니다.
curl "https://api.wordlyenglish.com/v1/words/water?languages=tr,de" \
-H "Authorization: Bearer $WORDLY_API_KEY"GET /v1/words/search
다음으로 검색 q 그리고 선택사항 level, part_of_speech, category, limit, and cursor. Limits range from 1 to 50. Pass meta.next_cursor 다음 요청에 들어갑니다.
curl "https://api.wordlyenglish.com/v1/words/search?q=app&level=advanced&limit=20" \
-H "Authorization: Bearer $WORDLY_API_KEY"GET /v1/words/random
1~20개의 임의의 단어를 반환합니다. 필터링 기준 level, part_of_speech, or category. Each returned slot costs one credit.
POST /v1/words/batch
단일 요청에서 1~50개의 고유 단어를 찾습니다. 응답은 요청 순서를 유지하고 모든 항목에 다음을 표시합니다. found.
curl -X POST "https://api.wordlyenglish.com/v1/words/batch?lang=tr" \
-H "Authorization: Bearer $WORDLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"words":["water","opportunity"],"languages":["tr","de"]}'GET /v1/languages
지원되는 인터페이스 및 API 메시지 로캘 30개를 모두 반환합니다. 어휘 번역은 사용 가능한 경우에만 반환됩니다. 이 엔드포인트는 공개되어 있으며 크레딧 비용은 0입니다.
비율 제한
각 API 키는 분당 120개의 요청으로 제한됩니다. 응답에는 다음이 포함됩니다. X-RateLimit-Limit 그리고 X-RateLimit-Remaining. A 429 rate_limit_exceeded 응답에는 다음이 포함됩니다. Retry-After: 60.
/v1/languagesLive · 0 creditsLists all supported interface and API-message locales. Vocabulary translations are returned only when a record contains them.
Query parameters
| 이름 | Type | 필수 | Rules | 설명 |
|---|---|---|---|---|
lang | string | No | Supported locale code | Language for human-readable messages. |
예시 요청
curl "https://api.wordlyenglish.com/v1/languages?lang=tr"200 · Success
{
"data": [{
"code": "tr",
"name": "Türkçe",
"message_localization": true,
"vocabulary_translation": "when_available"
}],
"meta": { "count": 30, "lang": "tr" }
}/v1/words/{word}Live · 1–5 creditsReturns one exact vocabulary record. Catalog and translated records cost 1 credit; enriched records cost 5 credits.
Parameters
| 이름 | Location | Type | 필수 | Rules and meaning |
|---|---|---|---|---|
word | Path | string | 예 | Exact word or slug; maximum 120 characters. URL-encode special characters. |
languages | Query | string | No | Comma-separated translation codes, for example tr,de,fr. |
lang | Query | string | No | Human-readable message language; not a vocabulary filter. |
예시 요청
curl "https://api.wordlyenglish.com/v1/words/water?languages=tr,de" \
-H "Authorization: Bearer $WORDLY_API_KEY" \
-H "Accept: application/json"200 · Success
{
"data": {
"id": "water",
"word": "water",
"part_of_speech": "noun",
"level": "basic",
"definition": "A clear liquid essential for life.",
"example": "Please drink enough water every day.",
"translations": { "tr": "su", "de": "Wasser" },
"categories": ["nature", "daily-life"],
"media": {
"image_url": "https://media.example/water.webp",
"audio_url": "https://media.example/water.mp3",
"attribution": {}
},
"completeness": "enriched"
},
"meta": {
"credits_used": 5,
"request_id": "5ebac760-cdc5-4a73-a87b-22463d81483c",
"lang": "en"
}
}404 · Word unavailable
{
"error": { "code": "word_not_found", "message": "The requested word was not found." },
"meta": { "lang": "en" }
}/v1/words/search라이브 · 1크레딧Searches active vocabulary in alphabetical order. Use the returned cursor for stable forward pagination.
Query parameters
| 이름 | Type | 필수 | Default / limit | 설명 |
|---|---|---|---|---|
q | string | No | Max 120 chars | Case-insensitive contained text. |
level | string | No | Max 30 chars | Exact level filter. |
part_of_speech / pos | string | No | Max 40 chars | Exact grammatical-class filter. |
category | string | No | Max 80 chars | Category-array filter. |
limit | integer | No | 20; min 1, max 50 | Maximum returned records. |
cursor | string | No | Max 120 chars | Previous meta.next_cursor. |
languages | string | No | Comma-separated | Translations to include. |
예시 요청
curl "https://api.wordlyenglish.com/v1/words/search?q=app&level=advanced&languages=tr&limit=2" \
-H "Authorization: Bearer $WORDLY_API_KEY"200 · Success
{
"data": [{
"id": "application",
"word": "application",
"part_of_speech": "noun",
"level": "advanced",
"definition": null,
"example": null,
"translations": { "tr": "uygulama" },
"categories": [],
"media": { "image_url": null, "audio_url": null, "attribution": {} },
"completeness": "translated"
}],
"meta": { "credits_used": 1, "request_id": "...", "lang": "en", "count": 1, "next_cursor": null }
}/v1/words/randomLive · 1 credit per requested slotReturns random active words for quizzes, discovery feeds, and practice sessions.
Query parameters
| 이름 | Type | 필수 | Default / limit | 설명 |
|---|---|---|---|---|
count | integer | No | 1; min 1, max 20 | Requested slots and credit cost. |
level | string | No | Exact value | Level filter. |
part_of_speech / pos | string | No | Exact value | Grammatical-class filter. |
category | string | No | Exact value | Category filter. |
languages | string | No | Comma-separated | Translations to include. |
예시 요청
curl "https://api.wordlyenglish.com/v1/words/random?count=3&level=basic&languages=tr" \
-H "Authorization: Bearer $WORDLY_API_KEY"200 · Success
{
"data": [{ "id": "water", "word": "water", "part_of_speech": "noun", "level": "basic", "definition": null, "example": null, "translations": { "tr": "su" }, "categories": [], "media": { "image_url": null, "audio_url": null, "attribution": {} }, "completeness": "translated" }],
"meta": { "credits_used": 3, "request_id": "...", "lang": "en", "count": 1 }
}/v1/words/batchLive · calculatedLooks up 1–50 unique words while preserving request order. Each enriched result costs 5 credits, another found result costs 1, and the minimum request charge is 1.
헤더
| 이름 | 필수 | Value |
|---|---|---|
Authorization | 예 | Bearer wly_live_... |
Content-Type | 예 | application/json |
Accept | 추천 | application/json |
JSON body
| Field | Type | 필수 | Rules | 설명 |
|---|---|---|---|---|
words | string[] | 예 | 1–50 items; each max 120 chars | Words to resolve; duplicates are normalized and removed. |
languages | string[] | No | Supported locale codes | Translations to include. |
예시 요청
curl -X POST "https://api.wordlyenglish.com/v1/words/batch?lang=tr" \
-H "Authorization: Bearer $WORDLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"words":["water","not-a-word"],"languages":["tr","de"]}'200 · Success
{
"data": [
{ "query": "water", "found": true, "word": { "id": "water", "word": "water", "part_of_speech": "noun", "level": "basic", "definition": null, "example": null, "translations": { "tr": "su", "de": "Wasser" }, "categories": [], "media": { "image_url": null, "audio_url": null, "attribution": {} }, "completeness": "translated" } },
{ "query": "not-a-word", "found": false, "word": null }
],
"meta": { "credits_used": 1, "request_id": "...", "lang": "tr", "count": 2 }
}422 · Invalid body
{
"error": { "code": "invalid_request", "message": "Provide between 1 and 50 words." },
"meta": { "lang": "en" }
}Response field reference
Every stable response variable is described below. Additive fields may appear later, so clients should ignore fields they do not recognize.
Vocabulary object
| Field | Type | Nullable | 설명 |
|---|---|---|---|
id | string | No | Stable URL-safe slug. |
word | string | No | Canonical English word. |
part_of_speech | string | 예 | Grammatical class. |
level | string | 예 | Learning difficulty or catalog level. |
definition | string | 예 | Concise English definition. |
example | string | 예 | Natural example sentence. |
phonetic | string | 예 | Pronunciation transcription when available. |
translations | object<string,string> | No | Locale codes mapped to translations; may be empty. |
synonyms | string[] | No | Available synonyms. |
antonyms | string[] | No | Available antonyms. |
categories | string[] | No | Learning or semantic categories. |
media.image_url | URL string | 예 | Learning image URL. |
media.audio_url | URL string | 예 | Pronunciation audio URL. |
media.attribution | object | No | Required media attribution metadata. |
completeness | enum | No | catalog, translated, or enriched. |
Meta object
| Field | Type | When present | 설명 |
|---|---|---|---|
credits_used | integer | Metered responses | Credits charged by this request. |
request_id | UUID string | Metered success | Support and billing trace ID. |
lang | string | Always | Selected message locale. |
count | integer | List responses | Number of response items. |
next_cursor | string or null | Search | Next page cursor; null means final page. |
Error object
| Field | Type | 설명 |
|---|---|---|
error.code | string | Stable machine-readable code. |
error.message | string | Localized human-readable explanation. |
error.upgrade_url | string | Relative billing URL on a 402 result. |
meta.lang | string | Error-message locale. |
오류
| HTTP | 코드 | 의미 | 클라이언트 작업 |
|---|---|---|---|
| 401 | invalid_api_key | 키가 누락되었거나, 형식이 잘못되었거나, 취소되었거나, 비활성 상태입니다. | Bearer 헤더를 확인하거나 키를 교체하세요. |
| 402 | credits_exhausted | 계정에 작업에 대한 크레딧이 부족합니다. | 재시도를 중지하고 고객에게 결제를 안내하세요. |
| 404 | not_found | 요청한 엔드포인트를 사용할 수 없습니다. | 경로와 API 버전을 확인하세요. |
| 404 | word_not_found | 요청한 어휘 항목을 사용할 수 없습니다. | 철자를 확인하거나 검색을 사용하세요. |
| 422 | invalid_request | 매개변수 또는 배치 본문이 잘못되었습니다. | 재시도하기 전에 요청을 수정하세요. |
| 405 | method_not_allowed | The endpoint does not accept the HTTP method. | Use the documented GET or POST method. |
| 413 | payload_too_large | The JSON request body exceeds 64 KB. | Reduce the batch body. |
| 415 | unsupported_media_type | The batch request is not JSON. | Send Content-Type: application/json. |
| 429 | rate_limit_exceeded | API 키가 분당 요청 120개를 초과했습니다. | Wait for Retry-After. |
| 5xx | server_error | 예상치 못한 서버 측 오류입니다. | 백오프로 재시도하세요. 지속되는 경우 지원팀에 문의하세요. |
권장 재시도 정책
다시 시도하지 않음 401, 402, or 404 자동으로. 일시적인 경우 5xx 응답이 있는 경우 지터와 엄격한 재시도 제한이 있는 지수 백오프를 사용하세요. 승인된 각 요청이 크레딧을 소비할 수 있으므로 무제한 재시도 루프를 생성하지 마십시오.
자바스크립트/Node.js
const response = await fetch('https://api.wordlyenglish.com/v1/account', {
headers: {
Authorization: `Bearer ${process.env.WORDLY_API_KEY}`,
Accept: 'application/json'
}
});
const body = await response.json();
if (!response.ok) {
throw new Error(`${body.error.code}: ${body.error.message}`);
}
console.log(body.data.credits_remaining);파이썬
import os
import requests
response = requests.get(
'https://api.wordlyenglish.com/v1/account',
headers={
'Authorization': f'Bearer {os.environ["WORDLY_API_KEY"]}',
'Accept': 'application/json',
},
timeout=15,
)
response.raise_for_status()
print(response.json()['data']['credits_remaining'])PHP
$curl = curl_init('https://api.wordlyenglish.com/v1/account');
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WORDLY_API_KEY'),
'Accept: application/json',
],
]);
$body = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
if ($status >= 400) {
throw new RuntimeException('Wordly API request failed');
}
$data = json_decode($body, true, flags: JSON_THROW_ON_ERROR);다트/플러터
Flutter 애플리케이션 내부에 Wordly 키를 제공하지 마세요. 이 예는 신뢰할 수 있는 Dart 백엔드 또는 서버 기능에 속합니다.
final response = await http.get(
Uri.parse('https://api.wordlyenglish.com/v1/account'),
headers: {
'Authorization': 'Bearer ${Platform.environment['WORDLY_API_KEY']}',
'Accept': 'application/json',
},
);
final body = jsonDecode(response.body) as Map<String, dynamic>;
if (response.statusCode >= 400) {
throw Exception((body['error'] as Map)['code']);
}생산 체크리스트
- 신뢰할 수 있는 백엔드를 통해 Wordly 요청을 프록시합니다.
- 연결 및 응답 시간 초과를 설정합니다.
- 핸들
401,402,404, and5xx별도로. - Query
GET /v1/accountwhen your application needs the current balance. - 로그 엔드포인트, 상태, 대기 시간 및
request_idAPI 키를 기록하지 않고. - 환경별로 별도의 키를 사용하고 주기적으로 교체하세요.
- Cache stable vocabulary responses in your backend when appropriate.
첫 번째 요청을 할 준비가 되셨나요?
계정을 만들고, 이메일을 확인하고, 50 무료 크레딧을 받으세요.
통합 도움이 필요하십니까? 이메일 [email protected].