Utilities & Helpers
Common utility operations: text processing, pattern matching, timezone conversion, and unique ID generation.
Quick Reference: All requests go to POST /api/services/execute with your API key in the Authorization: Bearer YOUR_API_KEY header.
Text Pattern Matching
Service: regex-matcher
Extract data from text using regular expressions. Find emails, phone numbers, URLs, or any custom pattern.
Extract All Email Addresses from Text
Parse a document to find all email addresses mentioned.
curl -X POST https://www.acrewity.com/api/services/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "regex-matcher",
"operation": "match_regex",
"parameters": {
"text": "Contact sales@example.com for pricing or support@example.com for help.",
"pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
"flags": "g"
}
}'
# Response: ["sales@example.com", "support@example.com"]
Validate and Extract Phone Numbers
Find all US phone numbers in a customer database export.
// JavaScript - Extract phone numbers
const response = await fetch('https://www.acrewity.com/api/services/execute', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service: 'regex-matcher',
operation: 'match_regex',
parameters: {
text: customerNotes,
pattern: '\\(?\\d{3}\\)?[-.\\s]?\\d{3}[-.\\s]?\\d{4}',
flags: 'g'
}
})
});
Extract URLs from Text
Find all URLs mentioned in a document.
# Python - Extract URLs
import requests
response = requests.post(
'https://www.acrewity.com/api/services/execute',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'service': 'regex-matcher',
'operation': 'match_regex',
'parameters': {
'text': 'Check out https://example.com and http://test.org for more info.',
'pattern': 'https?://[\\w\\-\\.]+\\.[a-zA-Z]{2,}[/\\w\\-\\.?=&]*',
'flags': 'g'
}
}
)
urls = response.json()['result']['data']['matches']
# urls = ['https://example.com', 'http://test.org']
Use Cases:
Pull structured data (dates, IDs, codes) from unstructured text.
Extract error codes, timestamps, or IPs from server logs.
Text Comparison
Service: text-diff
Compare two text strings and get detailed diff output. Shows additions, deletions, and unchanged sections.
Track Document Changes
Show users what changed between two versions of a document.
curl -X POST https://www.acrewity.com/api/services/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "text-diff",
"operation": "compare_text",
"parameters": {
"text1": "The quick brown fox jumps over the lazy dog.",
"text2": "The quick red fox leaps over the sleeping dog.",
"format": "unified"
}
}'
Compare Configuration Files
Detect changes between two versions of a config file.
// JavaScript - Compare configs
const response = await fetch('https://www.acrewity.com/api/services/execute', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service: 'text-diff',
operation: 'compare_text',
parameters: {
text1: oldConfig,
text2: newConfig,
format: 'detailed'
}
})
});
const { result } = await response.json();
// result.data.changes contains array of additions, deletions, unchanged
Use Cases:
Show changes between document versions in your CMS.
Detect what changed when users edit their posts or profiles.
Timezone Conversion
Service: timezone-converter
Convert times between timezones. Handle scheduling across regions without timezone library dependencies.
Convert Meeting Time for Global Team
Show a meeting scheduled in EST to users in different timezones.
curl -X POST https://www.acrewity.com/api/services/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "timezone-converter",
"operation": "convert_timezone",
"parameters": {
"datetime": "2025-01-15T14:00:00",
"fromTimezone": "EST",
"toTimezone": "PST"
}
}'
# Response: { "converted": "2025-01-15T11:00:00", "fromTimezone": "EST", "toTimezone": "PST" }
Convert to Multiple Timezones
Display event time in multiple regions for international audiences.
// JavaScript - Convert to multiple timezones
const eventTime = '2025-02-20T09:00:00';
const sourceTimezone = 'America/New_York';
const targetTimezones = ['Europe/London', 'Asia/Tokyo', 'Australia/Sydney'];
const conversions = await Promise.all(targetTimezones.map(async (tz) => {
const response = await fetch('https://www.acrewity.com/api/services/execute', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service: 'timezone-converter',
operation: 'convert_timezone',
parameters: {
datetime: eventTime,
fromTimezone: sourceTimezone,
toTimezone: tz
}
})
});
const data = await response.json();
return { timezone: tz, time: data.result.data.converted };
}));
UUID Generation
Service: uuid-generator
Generate unique identifiers. Supports v1 (timestamp), v4 (random), and v5 (namespace). Bulk generation available.
Generate Batch of UUIDs for Database Seeding
Create multiple UUIDs at once for inserting test data.
curl -X POST https://www.acrewity.com/api/services/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "uuid-generator",
"operation": "generate_uuid",
"parameters": {
"version": 4,
"count": 10
}
}'
# Response includes array of 10 unique UUIDs
Generate Deterministic UUID
Create the same UUID for a given namespace and name (v5).
// JavaScript - Deterministic UUID
const response = await fetch('https://www.acrewity.com/api/services/execute', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service: 'uuid-generator',
operation: 'generate_uuid',
parameters: {
version: 5,
namespace: '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
name: 'user@example.com'
}
})
});
// Same input always produces the same UUID
Use Cases:
Generate unique primary keys before inserting records.
Create correlation IDs to trace requests across services.
URL Encoding/Decoding
Service: url-encoder-decoder
Safely encode special characters for URLs or decode URL-encoded strings.
Encode Search Query for API Call
Safely encode user input for inclusion in a URL.
curl -X POST https://www.acrewity.com/api/services/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "url-encoder-decoder",
"operation": "encode",
"parameters": {
"text": "search term with spaces & special=chars"
}
}'
# Response: "search%20term%20with%20spaces%20%26%20special%3Dchars"
Decode URL Parameters
Parse encoded query string values.
// JavaScript - Decode URL
const response = await fetch('https://www.acrewity.com/api/services/execute', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service: 'url-encoder-decoder',
operation: 'decode',
parameters: {
text: 'Hello%20World%21%20%26%20Welcome'
}
})
});
// Result: "Hello World! & Welcome"
Markdown Table Generation
Service: markdown-table-generator
Generate properly formatted Markdown tables from data. Perfect for auto-generating documentation or reports.
Generate API Status Table
Create a formatted status table for your status page or README.
curl -X POST https://www.acrewity.com/api/services/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "markdown-table-generator",
"operation": "generate_table",
"parameters": {
"headers": ["Service", "Status", "Uptime"],
"rows": [
["API Gateway", "Operational", "99.98%"],
["Database", "Operational", "99.95%"],
["CDN", "Degraded", "98.50%"]
],
"alignment": ["left", "center", "right"]
}
}'
Generate Feature Comparison Table
Create a comparison table for product documentation.
# Python - Generate comparison table
import requests
response = requests.post(
'https://www.acrewity.com/api/services/execute',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'service': 'markdown-table-generator',
'operation': 'generate_table',
'parameters': {
'headers': ['Feature', 'Free', 'Pro', 'Enterprise'],
'rows': [
['API Calls', '1,000/mo', '50,000/mo', 'Unlimited'],
['Support', 'Community', 'Email', '24/7 Phone'],
['SLA', 'None', '99.9%', '99.99%']
],
'alignment': ['left', 'center', 'center', 'center']
}
}
)
markdown_table = response.json()['result']['data']['table']
Related Services
- Regex Matcher - Full service documentation
- Text Diff - Full service documentation
- Timezone Converter - Full service documentation
- UUID Generator - Full service documentation
- URL Encoder/Decoder - Full service documentation
- Markdown Table Generator - Full service documentation