Everything you need to integrate TextMatch API into your application
Get up and running with TextMatch API in less than 5 minutes. Follow these simple steps to make your first text comparison.
Sign up for a free account and get your API key from the dashboard:
curl -X POST https://api.textmatch.com/v1/auth/signup
const response = await fetch('https://api.textmatch.com/v1/compare', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text1: "Premium wireless headphones with noise cancellation",
text2: "High-end wireless earbuds featuring active noise reduction"
})
});
const data = await response.json();
console.log(data);
// Output: { similarity_score: 89, confidence: "high", processing_time_ms: 45 }
TextMatch API uses API keys for authentication. Include your API key in the Authorization header of every request.
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.textmatch.com/v1/compare
Security Note
Never expose your API key in client-side code. Always make API calls from your backend server.
/v1/compare
Compare two text snippets and get a similarity score.
text1 (string, required) - First text snippettext2 (string, required) - Second text snippet/v1/usage
Get your current API usage statistics.
/v1/status
Check API service status and response times.
All API requests should be made to https://api.textmatch.com with JSON payloads.
{
"text1": "Advanced smartphone with dual camera and fast processor",
"text2": "Modern mobile phone featuring dual lens camera and high-speed CPU"
}
All successful API responses return JSON with a consistent structure:
{
"similarity_score": 87,
"confidence": "high",
"processing_time_ms": 45,
"details": {
"semantic_similarity": 0.89,
"feature_overlap": 0.85,
"style_match": 0.91
},
"request_id": "req_1234567890"
}
| Field | Type | Description |
|---|---|---|
| similarity_score | integer | Overall similarity score (0-100) |
| confidence | string | Confidence level: low, medium, high |
| processing_time_ms | integer | Processing time in milliseconds |
TextMatch API uses conventional HTTP response codes to indicate success or failure:
Invalid request format or missing required parameters
Invalid or missing API key
Too many requests - rate limit exceeded
Internal server error - please try again later
Rate limits vary by subscription plan and are designed to ensure fair usage:
| Plan | Requests/Minute | Burst Limit |
|---|---|---|
| Developer (Free) | 10 | 20 |
| Startup | 100 | 200 |
| Business | 1000 | 2000 |
| Enterprise | Custom | Custom |
We provide official SDKs for popular programming languages to make integration easier:
npm install textmatch-api
const TextMatch = require('textmatch-api');
const client = new TextMatch('your-api-key');
const result = await client.compare(
'High-performance laptop computer',
'Powerful notebook PC'
);
pip install textmatch-api
from textmatch import TextMatchClient
client = TextMatchClient('your-api-key')
result = client.compare(
'High-performance laptop computer',
'Powerful notebook PC'
)
More SDKs coming soon: