Base URL
Endpoints Overview
Method | Endpoint | Description |
---|---|---|
GET | /text/ | Process text with query parameters |
POST | /text/ | Process text with JSON body |
GET /text/
Process text using query parameters.Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
text | string | required | Text to process |
operation | string | analyze | Operation to perform |
format | string | json | Output format (json/text) |
Supported Operations
Text Analysis
Operation | Description | Example Input | Example Output |
---|---|---|---|
analyze | Comprehensive text analysis | ”Hello World” | JSON with detailed statistics |
length | Get character count | ”Hello” | 5 |
word_count | Count words | ”Hello World” | 2 |
line_count | Count lines | ”Line 1\nLine 2” | 2 |
Case Transformations
Operation | Description | Example Input | Example Output |
---|---|---|---|
uppercase | Convert to UPPERCASE | ”hello world" | "HELLO WORLD” |
lowercase | Convert to lowercase | ”HELLO WORLD" | "hello world” |
titlecase | Convert to Title Case | ”hello world" | "Hello World” |
camelcase | Convert to camelCase | ”hello world" | "helloWorld” |
pascalcase | Convert to PascalCase | ”hello world" | "HelloWorld” |
snakecase | Convert to snake_case | ”Hello World" | "hello_world” |
kebabcase | Convert to kebab-case | ”Hello World" | "hello-world” |
Text Manipulation
Operation | Description | Example Input | Example Output |
---|---|---|---|
reverse | Reverse entire text | ”hello" | "olleh” |
reverse_words | Reverse word order | ”hello world" | "world hello” |
remove_spaces | Remove all spaces | ”hello world" | "helloworld” |
remove_duplicates | Remove duplicate characters | ”hello" | "helo” |
remove_duplicate_words | Remove duplicate words | ”hello world hello" | "hello world” |
Encoding/Decoding
Operation | Description | Example Input | Example Output |
---|---|---|---|
base64_encode | Encode to Base64 | ”hello" | "aGVsbG8=“ |
base64_decode | Decode from Base64 | ”aGVsbG8=" | "hello” |
url_encode | URL encode text | ”hello world" | "hello%20world” |
url_decode | URL decode text | ”hello%20world" | "hello world” |
html_encode | Encode HTML entities | ”<hello>" | "<hello>“ |
html_decode | Decode HTML entities | ”<hello>" | "<hello>“ |
Cipher Operations
Operation | Description | Example Input | Example Output |
---|---|---|---|
rot13 | Apply ROT13 cipher | ”hello" | "uryyb” |
caesar_cipher | Apply Caesar cipher | ”hello” (shift=3) | “khoor” |
Example Request
Response Format
POST /text/
Process text using JSON body parameters.Request Body
Example Request
Response Fields
Analysis Response (operation=analyze)
Field | Type | Description |
---|---|---|
original_text | string | Original input text |
operation | string | Operation performed |
analysis.length | integer | Total character count |
analysis.word_count | integer | Number of words |
analysis.line_count | integer | Number of lines |
analysis.character_frequency | object | Frequency of each character |
analysis.word_frequency | object | Frequency of each word |
analysis.uppercase_count | integer | Number of uppercase characters |
analysis.lowercase_count | integer | Number of lowercase characters |
analysis.digit_count | integer | Number of digits |
analysis.space_count | integer | Number of spaces |
analysis.punctuation_count | integer | Number of punctuation marks |
Simple Response (other operations)
Field | Type | Description |
---|---|---|
original_text | string | Original input text |
operation | string | Operation performed |
result | string | Processed text result |
Error Responses
Missing Text (400)
Invalid Operation (400)
Invalid Format (400)
Decoding Error (400)
HTTP Status Codes
Code | Description |
---|---|
200 | Success - Text processed |
400 | Bad Request - Invalid parameters |
500 | Internal Server Error |
Rate Limits
No rate limits! You can make unlimited requests to our API.Operation Details
Text Analysis
Theanalyze
operation provides comprehensive text statistics:
- Character Analysis: Counts each character occurrence
- Word Analysis: Splits by whitespace and counts word frequency
- Case Analysis: Distinguishes between uppercase and lowercase
- Content Analysis: Counts digits, spaces, and punctuation
Case Transformations
Naming Convention Conversions:- camelCase:
helloWorld
(first word lowercase, rest capitalized) - PascalCase:
HelloWorld
(all words capitalized) - snake_case:
hello_world
(words separated by underscores) - kebab-case:
hello-world
(words separated by hyphens)
Encoding Operations
Base64:- Encodes binary data as ASCII text
- Useful for embedding binary data in JSON
- Decoding requires valid Base64 input
- Encodes special characters for URLs
- Spaces become
%20
, special chars become%XX
- Safe for use in query parameters
- Converts special characters to HTML entities
<
becomes<
,>
becomes>
- Safe for embedding in HTML
Cipher Operations
ROT13:- Simple substitution cipher
- Rotates each letter by 13 positions
- Reversible (apply twice to get original)
- Shifts each letter by a specified amount
- Default shift is 3 positions
- Can be customized with additional parameters
Best Practices
Text Processing
Format Conversion
Encoding
Performance Considerations
Large Text Handling
For large text inputs:- Use POST requests instead of GET
- Consider breaking large text into chunks
- Use simpler operations for better performance