Taqnilex API Quickstart: Term Lookup in 5 Minutes
Get your first Taqnilex API call working in under five minutes. Copy-paste examples in cURL, Python, and Node.js for search, concordance, and batch term lookup.
The Taqnilex REST API gives you programmatic access to 910,000+ English--Arabic term pairs drawn from institutional corpora -- WIPO, the United Nations, Arabterm/ALECSO, Microsoft Terminology, and national patent offices. This guide gets you from zero to your first successful API call in under five minutes, with copy-paste examples in cURL, Python, and Node.js.
1. Get your API key
Every request to the Taqnilex API requires a bearer token. Here is how to get one:
- Go to app.taqnilex.com/dashboard and create an account.
- Navigate to API Keys in the sidebar.
- Click Generate New Key, give it a name (e.g.
dev-sandbox), and copy the token.
Keep this token secure. It is shown only once. If you lose it, revoke it and generate a new one.
Free-tier keys include 1,000 queries per month with no credit card required. See pricing for PRO and Enterprise tiers.
Set your key as an environment variable before running the examples below:
export TAQN_API_KEY="tqlx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
2. Search endpoint -- your first call
The search endpoint is the workhorse of the API. Send a term, get back ranked equivalents.
cURL
curl -X POST "https://api.taqnilex.com/v1/search" \
-H "Authorization: Bearer $TAQN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "intellectual property", "source_lang": "en", "target_lang": "ar", "top_k": 5}'
Response excerpt:
{
"results": [
{
"source_term": "intellectual property",
"target_term": "ملكية فكرية",
"source": "WIPO Pearl",
"harmonized": false,
"score": 0.973
},
{
"source_term": "intellectual property",
"target_term": "الملكية الفكرية",
"source": "Arabterm / ALECSO",
"harmonized": true,
"score": 0.961
}
],
"query_time_ms": 87,
"model_version": "labse_v1"
}
The harmonized: true field marks terms sourced from Arabterm/ALECSO -- the strongest cross-jurisdiction signal available. These carry the star Harmonized badge in the web UI and in exports.
Python (requests)
import os
import requests
API_KEY = os.environ["TAQN_API_KEY"]
BASE = "https://api.taqnilex.com/v1"
resp = requests.post(
f"{BASE}/search",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={
"q": "brevet d'invention",
"source_lang": "fr",
"target_lang": "ar",
"top_k": 5,
"domain": "patent",
},
)
resp.raise_for_status()
data = resp.json()
for r in data["results"]:
print(f"{r['source_term']} → {r['target_term']} [{r['source']}] score={r['score']:.3f}")
Node.js (fetch, Node 18+)
const BASE = "https://api.taqnilex.com/v1";
const resp = await fetch(`${BASE}/search`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TAQN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
q: "brevet d'invention",
source_lang: "fr",
target_lang: "ar",
top_k: 5,
domain: "patent",
}),
});
const data = await resp.json();
data.results.forEach((r) =>
console.log(`${r.source_term} → ${r.target_term} [${r.source}] score=${r.score}`)
);
Search parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
q |
string | yes | -- | The term to search for |
source_lang |
string | no | en |
Source language: en, ar, fr |
target_lang |
string | no | ar |
Target language: en, ar, fr |
top_k |
integer | no | 10 | Number of results (max 50) |
domain |
string | no | -- | Filter: patent, pharma, legal, energy, construction, it |
jurisdiction |
string | no | -- | Filter: SA, JO, WIPO, UN, EG, AE |
3. Concordance endpoint
The concordance endpoint returns sentences where a term appears in context -- the raw evidence behind each result. This is what powers the click-pivot UX in the web application.
curl -X GET "https://api.taqnilex.com/v1/concordance?term=intellectual+property&source_lang=en&target_lang=ar&limit=3" \
-H "Authorization: Bearer $TAQN_API_KEY"
resp = requests.get(
f"{BASE}/concordance",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"term": "intellectual property", "source_lang": "en", "target_lang": "ar", "limit": 3},
)
for sentence in resp.json()["sentences"]:
print(f"EN: {sentence['source_sentence']}")
print(f"AR: {sentence['target_sentence']}")
print(f"Source: {sentence['source_name']}\n")
4. Batch endpoint
When you need to look up dozens or hundreds of terms at once, use the batch endpoint. It accepts up to 100 terms per request and returns results asynchronously via a job ID that you can poll.
# Submit a batch job
curl -X POST "https://api.taqnilex.com/v1/batch" \
-H "Authorization: Bearer $TAQN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"terms": ["brevet", "marque déposée", "contrefaçon", "cession de droits"], "source_lang": "fr", "target_lang": "ar"}'
# Response: {"job_id": "bth_7f3a91c2", "status": "pending", "terms_count": 4}
# Poll for results
curl -X GET "https://api.taqnilex.com/v1/batch/bth_7f3a91c2" \
-H "Authorization: Bearer $TAQN_API_KEY"
# Response when complete: {"job_id": "bth_7f3a91c2", "status": "done", "results": [...]}
For jobs larger than 100 terms, split your term list into chunks and submit multiple batch jobs. Enterprise-tier keys can request a dedicated batch queue with higher concurrency -- contact support for setup.
5. Rate limits by tier
| Tier | Queries / month | Rate limit (req/s) | Batch terms / job | Price |
|---|---|---|---|---|
| Free | 1,000 | 2 | 100 | $0 |
| Pro | 50,000 | 10 | 1,000 | $49/mo |
| Enterprise | Custom | 50+ | 10,000+ | Custom |
Rate-limit headers are included in every response:
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 7
X-RateLimit-Reset: 1719445200
When you hit the rate limit, the API returns 429 Too Many Requests with a Retry-After header. Exponential backoff with jitter is recommended.
6. Glossary export
Authenticated users can export term lists in TBX, CSV, or JSON format. This endpoint is available on all tiers:
curl -X POST "https://api.taqnilex.com/v1/export" \
-H "Authorization: Bearer $TAQN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "patent", "jurisdiction": "WIPO", "format": "tbx", "limit": 500}'
The response is a downloadable file ready for import into MemoQ, Trados, or any CAT tool that supports the TBX standard. For large exports (Enterprise tier), asynchronous export with email delivery is available.
7. Embeddings endpoint
Generate LaBSE embeddings for your own terminology pipelines:
curl -X POST "https://api.taqnilex.com/v1/embeddings" \
-H "Authorization: Bearer $TAQN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"texts": ["intellectual property", "patent claim", "prior art"]}'
Each text returns a 768-dimensional float vector suitable for semantic search, clustering, or fine-tuning downstream models. Embedding dimensions match the LaBSE multilingual space used internally by Taqnilex.
8. Best practices
Cache aggressively. Term translations are stable -- an API response for "brevet" will not change between one call and the next. Cache results locally using a hash of (term, source_lang, target_lang, domain) as the key.
Use the batch endpoint for bulk work. Avoid tight loops calling the search endpoint. Batch jobs are more efficient, count as fewer quota units, and return faster for large sets.
Filter by domain and jurisdiction early. Narrowing your query scope improves relevance and reduces noise. If you are translating a pharmaceutical patent, set domain=pharma and jurisdiction=WIPO.
Respect rate limits. Implement exponential backoff with jitter. The Retry-After header tells you exactly how long to wait.
Next steps
- Full API reference -- all endpoints, parameters, and response schemas
- Pricing and plans -- upgrade when you outgrow the free tier
- GlossExport -- export domain glossaries in TBX, CSV, or JSON
- Integration guides -- MemoQ, Trados, and CAT tool workflows
Start building. Your first API call is one environment variable and a cURL command away. Questions? Reach out to [email protected].