Custom Functions
14 utility endpoints for cleaning, normalizing, classifying, and formatting data inside your workflows. Run entirely on TexAu infrastructure with no external provider dependencies.
Custom functions are lightweight utilities that execute locally on TexAu's infrastructure. They're designed for the glue-work between higher-cost enrichment calls — cleaning messy inputs, deduplicating lists, normalizing phone numbers, classifying emails, and rotating leads across a team. Most cost 0.5 credits per call.
All custom functions use the same base URL, authentication, and response shape as the rest of the API:
POST https://v3-api.texau.com/api/v1/<function_name>
x-api-key: YOUR_API_KEY
Content-Type: application/json
clean_domain
Clean, normalize, and validate a URL or domain string. Strips protocols and paths, lowercases, extracts the root domain, and confirms the domain resolves in DNS.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/clean_domain \
-H "x-api-key: YOUR_API_KEY" \
-d '{"messy_url": "https://www.Example.COM/page?q=1"}'
{
"clean_url": "https://www.example.com/page?q=1",
"clean_domain": "example.com",
"validated_domain": true
}
Notes
- Rejects dangerous schemes (
javascript:,data:,file:) - Handles multi-part TLDs (
.co.uk,.com.au) - IP addresses and IDN/punycode return
validated_domain: false
predict_gender
Predict likely gender from a first name.
Credits: 1 per call
curl -X POST https://v3-api.texau.com/api/v1/predict_gender \
-H "x-api-key: YOUR_API_KEY" \
-d '{"name": "Alexandra"}'
{
"name": "Alexandra",
"gender": "female",
"probability": 0.97,
"count": 54032
}
Returns "unknown" when confidence is insufficient.
encode_uri
RFC 3986 percent-encoding. Equivalent to JavaScript's encodeURIComponent.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/encode_uri \
-H "x-api-key: YOUR_API_KEY" \
-d '{"value": "hello world & foo=bar"}'
{
"original_value": "hello world & foo=bar",
"encoded_value": "hello%20world%20%26%20foo%3Dbar"
}
count_occurrences
Count occurrences of each item in a separated list. Returns items sorted by count descending.
Credits: 0.5 per call
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
input | string | Yes | — | Separated list (max 1 MB) |
separator | string | No | , | Delimiter |
case_insensitive | boolean | No | true | Case-insensitive matching |
limit | integer | No | 0 | Max results (0 = all, max 1000) |
curl -X POST https://v3-api.texau.com/api/v1/count_occurrences \
-H "x-api-key: YOUR_API_KEY" \
-d '{"input": "apple,banana,apple,cherry,banana,apple", "separator": ",", "case_insensitive": true}'
{
"counts": [
{ "value": "apple", "count": 3 },
{ "value": "banana", "count": 2 },
{ "value": "cherry", "count": 1 }
],
"total_items": 6,
"unique_items": 3
}
find_sitemap_urls
Discover URLs on a domain via its sitemap, with optional keyword filtering.
Credits: 1 per call
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain to inspect |
keywords | string | No | Comma-separated filter keywords |
exact_match | boolean | No | Require exact keyword match (default: false) |
curl -X POST https://v3-api.texau.com/api/v1/find_sitemap_urls \
-H "x-api-key: YOUR_API_KEY" \
-d '{"domain": "example.com", "keywords": "blog,pricing"}'
normalize_list
Trim whitespace and deduplicate items in a separated list.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/normalize_list \
-H "x-api-key: YOUR_API_KEY" \
-d '{"input": "a, b ,c ,, d", "remove_empty_values": true}'
{
"output": ["a", "b", "c", "d"],
"count": 4,
"removed": 1
}
identify_email_type
Classify an email address as work, personal, role-based, or disposable.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/identify_email_type \
-H "x-api-key: YOUR_API_KEY" \
-d '{"email": "[email protected]"}'
{
"email": "[email protected]",
"type": "role",
"provider": "acme.com"
}
extract_urls_emails
Extract all URLs and email addresses from a block of text.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/extract_urls_emails \
-H "x-api-key: YOUR_API_KEY" \
-d '{"text": "Visit https://example.com or email [email protected]."}'
{
"urls": ["https://example.com"],
"emails": ["[email protected]"]
}
normalize_phone
Normalize a phone number to E.164 format via libphonenumber.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/normalize_phone \
-H "x-api-key: YOUR_API_KEY" \
-d '{"phone_number": "(415) 555-0123", "country_code": "US"}'
{
"input": "(415) 555-0123",
"e164": "+14155550123",
"national_format": "(415) 555-0123",
"country_code": "US",
"region": "US",
"type": "mobile",
"is_valid": true
}
normalize_company
Normalize a company name by stripping legal suffixes (Inc, LLC, Ltd, GmbH, etc.) with optional case normalization.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/normalize_company \
-H "x-api-key: YOUR_API_KEY" \
-d '{"company_name": "Acme Corporation, Inc.", "normalize_case": true}'
{
"input": "Acme Corporation, Inc.",
"normalized": "Acme Corporation"
}
remove_whitespace
Collapse multiple whitespace characters into single spaces and trim.
Credits: 0.5 per call
curl -X POST https://v3-api.texau.com/api/v1/remove_whitespace \
-H "x-api-key: YOUR_API_KEY" \
-d '{"input_text": " hello world "}'
{
"output": "hello world"
}
format_datetime
Format and timezone-convert a datetime string.
Credits: 0.5 per call
| Field | Type | Required | Description |
|---|---|---|---|
date | string | Yes | ISO 8601 or parseable datetime |
format | string | No | Output format (e.g. YYYY-MM-DD HH:mm) |
original_timezone | string | No | Source timezone (e.g. UTC) |
new_timezone | string | No | Target timezone (e.g. America/New_York) |
locale | string | No | BCP-47 locale (e.g. en-US) |
curl -X POST https://v3-api.texau.com/api/v1/format_datetime \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"date": "2026-04-14T10:00:00Z",
"format": "YYYY-MM-DD HH:mm",
"new_timezone": "America/New_York"
}'
find_redirect
Follow HTTP redirects and return the final URL.
Credits: 1 per call
curl -X POST https://v3-api.texau.com/api/v1/find_redirect \
-H "x-api-key: YOUR_API_KEY" \
-d '{"link": "https://bit.ly/3xyzabc"}'
{
"original_url": "https://bit.ly/3xyzabc",
"final_url": "https://www.example.com/landing",
"redirect_chain": ["https://bit.ly/3xyzabc", "https://www.example.com/landing"],
"status_code": 200
}
distribute_leads
Round-robin assign a list of values across a set of labels. Stateless — the
caller persists current_index and passes it back on the next call.
Credits: 0.5 per call
| Field | Type | Required | Description |
|---|---|---|---|
assignment_labels | string | Yes | Comma-separated labels (e.g. alice,bob,carol) |
values_associated_with_labels | string | Yes | Comma-separated values — count must match labels |
current_index | integer | No | Current pointer (default: 0) |
curl -X POST https://v3-api.texau.com/api/v1/distribute_leads \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"assignment_labels": "alice,bob,carol",
"values_associated_with_labels": "lead1,lead2,lead3",
"current_index": 0
}'
{
"assigned_label": "alice",
"assigned_value": "lead1",
"assignment_index": 0,
"next_index": 1,
"total_assignments": 3
}
Label count must exactly match value count — a mismatch returns
HTTP 400 "Label count (N) must match value count (M)".
Last updated 2 weeks ago
Built with Documentation.AI