Credits
How credits work, cost breakdowns for single and multiple item API responses.
Each request may consume a different number of credits depending on the endpoint and parameters used. Refer to the endpoint and parameter descriptions for details on credit usage. The use_cache and live_fetch parameters also affect credit costs.
In the API Logs, you can view the total credit cost of a request as well as the detailed breakdown.
Credits Breakdown
Single Item Response
curl \
-G "https://enrichlayer.com/api/v2/profile" \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
--data-urlencode "profile_url=https://www.linkedin.com/in/williamhgates" \
--data-urlencode "extra=include" \
--data-urlencode "github_profile_id=include" \
--data-urlencode "facebook_profile_id=include" \
--data-urlencode "twitter_profile_id=include" \
--data-urlencode "personal_contact_number=include" \
--data-urlencode "inferred_salary=include" \
--data-urlencode "skills=include" \
--data-urlencode "live_fetch=force"This is the general format of the API log for a single item response. Note that sometimes a parameter might not have a fixed cost. For example, personal_contact_number might return 2 personal numbers so it costs 2 credits and skills might be empty so it doesn't cost any credits and doesn't show up in the API log either.
| Parameter | Nested? | Description |
|---|---|---|
base_cost | No | Base cost of the endpoint. |
premium_parameter_1 | No | Cost of the first premium parameter. |
premium_parameter_2 | No | Cost of the second premium parameter. |
Example API log for Person Profile Endpoint with all premium parameters:
{
"base_cost": 1,
"extra_data": 1,
"github_profile_id": 1,
"facebook_profile_id": 1,
"twitter_profile_id": 1,
"live_fetch": 9
}Multiple Items Response
curl \
-G "https://enrichlayer.com/api/v2/company/employees" \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
--data-urlencode "url=https://www.linkedin.com/company/microsoft" \
--data-urlencode "country=ca" \
--data-urlencode "boolean_role_search=software and engineer" \
--data-urlencode "sort_by=recently-joined" \
--data-urlencode "page_size=3"| Parameter | Nested? | Description |
|---|---|---|
base_cost | No | Base cost of the endpoint. |
premium_parameter_1 | No | Cost of the first premium parameter applied regardless of items returned. |
premium_parameter_2 | No | Cost of the second premium parameter applied regardless of items returned. |
items | No | Total costs of the items returned. Equal to sum of items_breakdown multiplied by items_count. |
items_count | No | Number of items returned. |
items_breakdown | Yes | Breakdown of costs per item. Same format as single item response. |
Example API log for Employee Listing with premium parameters (3 items returned = 57 credits + 60 base = 117 credits total):
{
"role_search": 10,
"sort_by": 50,
"items": 57,
"items_count": 3,
"items_breakdown": {
"base_cost": 3,
"role_search": 3,
"sort_by": 10,
"countries": 3
}
}