API Documentation

Everything you need to integrate the RichAPI API into your product.

Utilities

Clean Domain

Normalize a messy URL or domain string to a clean root domain.

POST
/api/v1/clean_domain
0.5 credits per call

Parameters

FieldTypeRequiredDescription
messy_urlstringYesURL or domain to normalize (e.g. https://www.Example.COM/page?q=1)

Example response

json
{
  "clean_domain": "acme.com",
  "clean_url": "https://www.acme.com",
  "validated_domain": true
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/clean_domain \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messy_url": "https://www.acme.com/about?ref=google"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Count Occurrences

Count how many times a substring appears in a string, with optional case-insensitive matching.

POST
/api/v1/count_occurrences
0.5 credits per call

Parameters

FieldTypeRequiredDescription
inputstringYesInput string to search within
separatorstringYesSubstring to split and count by
case_insensitiveboolNoCase-insensitive matching (default false)
limitintNoMax results to return (0 for all, max 1000)

Example response

json
{
  "results": [
    {
      "count": 2,
      "item": "foo"
    },
    {
      "count": 1,
      "item": "bar"
    },
    {
      "count": 1,
      "item": "baz"
    }
  ],
  "total_items": 4,
  "unique_items": 3
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/count_occurrences \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "foo,bar,foo,baz",
  "separator": ",",
  "case_insensitive": true,
  "limit": 10
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Distribute Leads

Round-robin distribute leads across a set of assignment labels (e.g. sales reps).

POST
/api/v1/distribute_leads
0.5 credits per call

Parameters

FieldTypeRequiredDescription
assignment_labelsstringNoComma-separated assignment labels (e.g. Team A,Team B,Team C)
values_associated_with_labelsstringYesComma-separated values to distribute (e.g. alice@co.com,bob@co.com)
current_indexintNoStarting index for round-robin (default 0)

Example response

json
{
  "assignments": [],
  "next_index": 1
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/distribute_leads \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "assignment_labels": "Team A,Team B,Team C",
  "values_associated_with_labels": "alice@co.com,bob@co.com,carol@co.com",
  "current_index": 0
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Encode URI

URL-encode a string for safe use in query parameters or path segments.

POST
/api/v1/encode_uri
0.5 credits per call

Parameters

FieldTypeRequiredDescription
valuestringYesString to URL-encode (RFC 3986)

Example response

json
{
  "encoded": "example"
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/encode_uri \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "value": "hello world & foo=bar"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Extract URLs & Emails

Extract all URLs and email addresses from a block of text.

POST
/api/v1/extract_urls_emails
0.5 credits per call

Parameters

FieldTypeRequiredDescription
textstringYesText block to extract URLs and emails from

Example response

json
{
  "emails": [],
  "urls": []
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/extract_urls_emails \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Contact us at hello@acme.com or visit https://acme.com"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Find Redirect

Follow a URL through all redirects and return the final destination URL.

POST
/api/v1/find_redirect
1 credit per call

Parameters

FieldTypeRequiredDescription
linkstringYesURL to follow through all redirects to the final destination

Example response

json
{
  "final_url": "example",
  "redirect_chain": [],
  "status_code": 1
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/find_redirect \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "link": "https://bit.ly/example"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Find Sitemap URLs

Discover and filter URLs from a domain's sitemap by keyword.

POST
/api/v1/find_sitemap_urls
1 credit per call

Parameters

FieldTypeRequiredDescription
domainstringYesDomain to discover sitemap URLs from (e.g. stripe.com)
keywordsstringNoComma-separated keywords to filter URLs
exact_matchboolNoMatch keywords exactly (default false)

Example response

json
{
  "total": 1,
  "urls": []
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/find_sitemap_urls \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "domain": "stripe.com",
  "keywords": "pricing",
  "exact_match": true
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Format Datetime

Parse and reformat a date/time string with optional timezone conversion and locale.

POST
/api/v1/format_datetime
0.5 credits per call

Parameters

FieldTypeRequiredDescription
datestringYesDate/time string to parse (ISO 8601 or common formats)
formatstringNostrftime format string for output (e.g. %B %d, %Y)
original_timezonestringNoTimezone of the input date (e.g. UTC)
new_timezonestringNoTarget timezone for output (e.g. America/New_York)
localestringNoLocale for month/day names (e.g. en, fr)

Example response

json
{
  "formatted": "example",
  "iso": "example",
  "timezone": "example"
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/format_datetime \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "date": "2026-04-11T14:30:00Z",
  "format": "%B %d, %Y",
  "original_timezone": "example",
  "new_timezone": "America/New_York",
  "locale": "example"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Identify Email Type

Classify an email address as personal, business, role-based, or disposable.

POST
/api/v1/identify_email_type
0.5 credits per call

Parameters

FieldTypeRequiredDescription
emailstringYesEmail address to classify

Example response

json
{
  "domain": "example",
  "type": "example"
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/identify_email_type \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "john.doe@gmail.com"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Normalize Company

Clean and normalize a company name by removing legal suffixes, extra whitespace, and punctuation.

POST
/api/v1/normalize_company
0.5 credits per call

Parameters

FieldTypeRequiredDescription
company_namestringYesCompany name to normalize (e.g. ACME TECHNOLOGIES, INC.)
normalize_caseboolNoConvert to title case (default true)

Example response

json
{
  "normalized": "example"
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/normalize_company \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "company_name": "ACME TECHNOLOGIES, INC.",
  "normalize_case": true
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Normalize List

Split a delimited string into a clean list, optionally removing empty values.

POST
/api/v1/normalize_list
0.5 credits per call

Parameters

FieldTypeRequiredDescription
inputstringYesDelimited string to split and deduplicate
remove_empty_valuesboolNoRemove empty items after splitting (default false)

Example response

json
{
  "list": []
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/normalize_list \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "apple, Banana, apple, , cherry",
  "remove_empty_values": true
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Normalize Phone

Parse and normalize a phone number to E.164 format with optional country code hint.

POST
/api/v1/normalize_phone
0.5 credits per call

Parameters

FieldTypeRequiredDescription
phone_numberstringYesPhone number to normalize (any format)
country_codestringNoISO country code hint (e.g. US)

Example response

json
{
  "country": "example",
  "e164": "example",
  "national": "example",
  "valid": true
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/normalize_phone \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "phone_number": "(415) 555-1234",
  "country_code": "US"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Predict Gender

Predict the gender of a person from their first name.

POST
/api/v1/predict_gender
1 credit per call

Parameters

FieldTypeRequiredDescription
namestringYesFirst name to predict gender for

Example response

json
{
  "confidence": 1,
  "gender": "example"
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/predict_gender \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Jordan"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Remove Whitespace

Strip and collapse extra whitespace from a string.

POST
/api/v1/remove_whitespace
0.5 credits per call

Parameters

FieldTypeRequiredDescription
input_textstringYesString to strip and collapse whitespace from

Example response

json
{
  "output": "example"
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/remove_whitespace \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input_text": "  hello   world  "
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try