Developer API
Integrate TextToolz functionality directly into your applications.
Introduction
Welcome to the TextToolz API! Our API provides programmatic access to our suite of tools, allowing you to build powerful integrations and automate your workflows. Access is available to users on our Pro and Enterprise plans.
Getting Started
To get started, you'll need an API key. You can generate and manage your API keys from your account dashboard after signing up for a qualifying plan.
Authentication
All API requests must be authenticated using your API key. Include your key in the `Authorization` header of your request as a Bearer token.
Authorization: Bearer YOUR_API_KEY
Rate Limiting
Our API has rate limits to ensure fair usage for all users. The specific limits depend on your subscription plan:
- Pro Plan: 1,000 requests per hour.
- Enterprise Plan: Custom limits tailored to your needs.
The `X-RateLimit-Remaining` header in the API response indicates your remaining requests in the current window.
Endpoints
Below is a list of available API endpoints. The base URL for all endpoints is `https://api.texttoolz.com/v1/`.
POST /tools/word-count
Calculates the number of words, characters, sentences, and paragraphs in a given text.
Parameters
{
"text": "This is a sample text. It has two sentences."
}
Example Response
{
"words": 9,
"characters": 48,
"sentences": 2,
"paragraphs": 1
}
POST /tools/text-reverse
Reverses a given string of text.
Parameters
{
"text": "Hello World"
}
Example Response
{
"reversed_text": "dlroW olleH"
}
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request. A `200 OK` status indicates success. Other codes will be used for errors.
- `400 Bad Request`: Invalid request body or parameters.
- `401 Unauthorized`: Missing or invalid API key.
- `429 Too Many Requests`: You have exceeded your rate limit.
- `500 Internal Server Error`: Something went wrong on our end.