Skip to main content

How Waterfall Enrichment Works and When You Are Charged

Written by Kadri - RichAPI Support Team

Waterfall enrichment sends one lookup to several data providers in a fixed order and stops at the first provider that returns data. Three RichAPI endpoints use a waterfall: Email Finder, Phone Finder, and Email Verifier. A waterfall call that finds nothing returns HTTP 200. Email and phone lookups that find nothing cost nothing.

What is waterfall enrichment?

A waterfall is an ordered list of data providers behind one RichAPI endpoint. RichAPI sends your input to the first provider in the list. If that provider returns data, RichAPI stops and returns that data to you. If that provider returns nothing, RichAPI moves to the next provider. RichAPI repeats this until one provider returns data, or until the list ends. You send one request and you receive one response. RichAPI pays every provider that it calls, and you pay one flat price for the whole call.

Why does a waterfall find more records than a single provider?

No single data provider holds every person. Each provider builds its own dataset, and each dataset covers a different part of the market. A waterfall pools that coverage into one call, so a miss from the first provider is not the end of the lookup. The second provider sees the same input and gets its own chance.

A waterfall also skips a provider whose required input is absent from your request. A request body that holds only a LinkedIn URL skips every provider that needs a name and a company domain. A skip costs no time and no credits.

Which RichAPI endpoints use a waterfall?

Endpoint

Path

What a hit returns

Credits on a hit

Credits on a miss

Email Finder

POST /v1/email_finder

A work email address

5

0

Phone Finder

POST /v1/phone_finder

A mobile phone number

25

0

Email Verifier

POST /v1/email_verifier

A deliverability status

2

—

A few lookup endpoints, for example Find Website by Company Name, also try more than one source. They answer in their own response shape, without the waterfall fields below. A lookup on them that finds nothing returns 404 and costs nothing. Read the endpoint article. Every other endpoint follows the normal billing rule in the next section.

When does RichAPI charge for a waterfall call?

The normal RichAPI rule is that RichAPI bills every 2xx response. A normal endpoint that returns 200 with zero results still costs the endpoint price. Email and phone lookups are the exception to that rule: email and phone lookups that find nothing cost nothing.

Email Finder and Phone Finder bill a 2xx response that holds "success": true. A 2xx response from them that holds "success": false costs 0 credits. For such a miss, RichAPI sets the price of the call to 0 credits and releases the credit reservation that it held for the call. The usage log records the call as Free with 0 credits.

Situation

A normal endpoint

Email Finder or Phone Finder

200 with data

The endpoint price

The endpoint price

200 with no data

The endpoint price

0 credits

400 invalid request body

0 credits

0 credits

401 bad key, 403 endpoint not on the plan

0 credits

0 credits

402 too few credits

0 credits

0 credits

429 rate limit

0 credits

0 credits

5xx API failure

0 credits

0 credits

CAUTION: Do not treat a 200 response from a waterfall endpoint as a hit. Read the success field. A 200 response with "success": false holds no data. On Email Finder and Phone Finder it costs 0 credits.

How do you read a waterfall response?

Every waterfall endpoint returns the same response envelope. The fields below appear for a hit and for a miss.

Field

Type

Description

success

boolean

true when a provider returned data. false when no provider returned data.

result

object or null

The data that the winning provider returned. It is null on a miss.

provider

string or null

The label of the source that returned the data. It is null on a miss.

providers_tried

integer

The number of providers that RichAPI tried for this call, including skipped providers.

execution_log

array

One entry per provider that RichAPI tried, in the order tried.

execution_log[].provider

string

The label of that source.

execution_log[].status

string

The outcome for that provider.

execution_log[].latency_ms

integer

The time that provider took, in milliseconds.

execution_log[].missing_inputs

array

Present only for the skipped_missing_input status. It names the absent inputs.

execution_log[].error

string

Present only for the error status. It always reads The data source returned an error.

execution_log[].reason

string

Present for the skipped_rate_limited status and on some skipped_no_key entries. It holds the reason for the skip.

billed

boolean

Present only on a miss. The value is always false.

error

string

Present only on a hard miss. It explains that every provider was unavailable.

What is the difference between a soft miss and a hard miss?

A soft miss and a hard miss both return 200 and both hold "success": false. On Email Finder and Phone Finder, both cost 0 credits. The two differ in cause, and each one needs a different action.

Outcome

What happened

success

error field

Credits

What to do

Hit

A provider returned data.

true

Absent

The endpoint price

Read result.

Soft miss

Every provider answered, and none held data for this lookup.

false

Absent

0

Do not send the same request again.

Hard miss

No provider answered. Providers were unreachable, timed out, or were skipped.

false

Present

0

Wait a few minutes, then send the same request again.

The error field is the reliable signal. A hard miss carries an error field. A soft miss carries no error field.

What does a soft miss look like?

The example below comes from a Phone Finder call. Phone Finder and Email Verifier label each source by its position: source_1, source_2, and so on.

{
"success": false,
"result": null,
"provider": null,
"providers_tried": 2,
"execution_log": [
{ "provider": "source_1", "status": "no_data", "latency_ms": 412 },
{ "provider": "source_2", "status": "no_data", "latency_ms": 688 }
],
"billed": false
}

A soft miss means that the providers looked and found nothing. The record does not exist in any dataset that RichAPI reached. A second identical request returns the same soft miss and can take up to 25 seconds.

What does a hard miss look like?

{
"success": false,
"result": null,
"provider": null,
"providers_tried": 2,
"execution_log": [
{ "provider": "source_1", "status": "error_503", "latency_ms": 2103 },
{ "provider": "source_2", "status": "timeout", "latency_ms": 10004 }
],
"billed": false,
"error": "All providers in this waterfall were temporarily unavailable. Your quota was refunded; please retry in a few minutes."
}

A hard miss means that RichAPI never got an answer about your record. The lookup was never completed, so a retry can still return data.

What does each execution log status mean?

The Provider answered column decides the miss type. If every entry in execution_log answers No, the call is a hard miss. If at least one entry answers Yes, the call is a soft miss.

Status

Meaning

Provider answered

success

The provider returned data that passed the success check.

Yes

no_data

The provider replied and held no data for this lookup.

Yes

error_429

The provider rate limited RichAPI.

No

error_500, error_502, error_503, error_504

The provider returned a server failure.

No

error_<other code>

The provider returned another HTTP error.

Yes

timeout

The provider passed its time limit.

No

error

The provider call failed for another reason.

No

skipped_missing_input

Your request body lacked an input that this provider needs.

No

skipped_no_key

RichAPI could not use this provider for this call.

No

skipped_unhealthy

RichAPI marked the provider unhealthy.

No

skipped_maintenance

RichAPI marked the provider as under maintenance.

No

skipped_disabled

RichAPI turned the provider off.

No

skipped_rate_limited

RichAPI declined the call to protect a provider rate limit.

No

skipped_timeout

The 25-second budget for the call ended before this provider ran.

No

How do you confirm that a waterfall call cost 0 credits?

  1. Open the RichAPI dashboard.

  2. Select Usage & Credits in the navigation.

  3. Select the Recent Calls tab on that page.

  4. Type the endpoint name in the Search endpoint... box.

  5. Find your call by the value in the Called column.

  6. Read the Billable column. An Email Finder or Phone Finder miss shows Free.

  7. Read the Credits column. An Email Finder or Phone Finder miss shows 0.

  8. Select Details on that row to see Provider, Latency, and Your price.

The Usage & Credits page lives at /home/<workspace-slug>/usage. The Status column shows 200 for a miss, because the request itself was valid.

What does a list of 1,000 lookups cost?

One credit costs $0.02 on the 1,000 and 5,000 credit packs, and less on larger packs. Email Finder costs 5 credits for a hit and 0 credits for a miss. The example below runs 1,000 Email Finder calls over a list with a 62% hit rate.

Outcome

Calls

Credits per call

Credits

Cost

Hit

620

5

3,100

$62.00

Soft miss

350

0

0

$0.00

Hard miss

30

0

0

$0.00

Total

1,000

—

3,100

$62.00

A normal per-call endpoint bills all 1,000 responses. At 5 credits per call that is 5,000 credits, or $100.00. The waterfall rule saves 1,900 credits, or $38.00, on this one list.

Your price per found email stays at 5 credits, or $0.10, whatever the hit rate. A lower hit rate lowers the bill and never raises the price of a found record.

The same list costs a different amount at each waterfall endpoint. The table below holds the hit count at 620 and counts the hits only.

Endpoint

Credits per hit

Credits for 620 hits

Cost

Email Finder

5

3,100

$62.00

Phone Finder

25

15,500

$310.00

Email Verifier

2

1,240

$24.80

The 30 hard misses in the example cost nothing. Send those 30 rows again after a short wait. Each retry that hits costs the endpoint price, and each retry that misses again costs 0 credits.

Why does the response name a provider that you do not recognize?

The provider field and every execution_log entry hold a label, not the internal name of the RichAPI integration. On Email Finder, the label is the short name of the data source. When Email Finder has no short name for a source, the field holds the value provider. On Phone Finder and Email Verifier, the labels are positions: source_1 is the first source tried, source_2 the second, and so on. A position label holds only inside one response, so source_1 in two responses can be two different sources. RichAPI selects the providers, sets their order, and changes that order over time. You cannot choose a provider, and you cannot pin a call to one provider.

How do you fix a waterfall problem?

Symptom

Cause

Correction

The response holds "success": false and no error field.

The call was a soft miss. Every provider answered and none held data.

Do not send the same request again. Add a LinkedIn URL, or correct the company domain, then send a new request.

The response holds "success": false and an error field.

The call was a hard miss. No provider answered.

Wait a few minutes, then send the same request again.

The call cost 0 credits and you expected a charge.

The lookup found nothing. Email Finder and Phone Finder bill only on a hit.

Read the success field. A false value confirms the 0-credit rule.

The call cost credits and result holds few fields.

A provider returned data, so the call was a hit. Field coverage varies by provider.

Read result. A hit at a waterfall endpoint is billable.

Every execution_log entry holds skipped_missing_input.

The request body satisfied the input needs of no provider that ran.

Send a complete input shape. Read the endpoint article for the accepted shapes.

The request returned 400 with an accepted_input_shapes field.

The request body satisfied no provider input shape.

Send one of the shapes that the response names. RichAPI charged 0 credits for the 400.

Hard misses repeat for more than one hour.

A provider outage lasted longer than a normal retry window.

Write to [email protected]. Include the endpoint name, the providers_tried value, and the execution_log array.

Frequently asked questions

Why did a waterfall endpoint return 200 with no data?

A waterfall endpoint returns 200 because the request was valid and RichAPI served it. The success field, and not the HTTP status, reports whether a provider found data. Read success in every waterfall response.

Why was I not charged for a waterfall call that returned 200?

Email and phone lookups that find nothing cost nothing. Email Finder and Phone Finder bill a response that holds "success": true. A response from them with "success": false also holds "billed": false, and RichAPI charges 0 credits for it. This rule is the exception to the normal rule that every 2xx response costs credits.

Do I have to send a failed waterfall request again?

The answer depends on the miss type. If the response holds an error field, the call was a hard miss and a retry can return data. If the response holds no error field, the call was a soft miss and a retry returns the same empty answer.

Does a waterfall charge one credit price for each provider that it tries?

No. RichAPI charges one flat price for the whole call, whatever the number of providers tried. The providers_tried field reports how many providers ran, and that number never changes the price.

Can I choose which provider a waterfall uses?

No. RichAPI sets the provider list and the provider order for each waterfall endpoint. The response reports the winning provider in the provider field and every attempt in execution_log.

How long can a waterfall call take?

Each waterfall call has a total budget of 25 seconds. Each provider inside the call has its own shorter time limit. Set a client timeout of 60 seconds so that a slow call completes instead of a client-side abort.

Which RichAPI endpoints bill a call that returns no data?

Email and phone lookups that find nothing cost nothing: Email Finder and Phone Finder charge 0 credits for a call that returns no data. Other endpoints can bill a 2xx response with zero results. Read the endpoint article.

Related articles

Did this answer your question?