How-to / Integrate the API / API REST
How do you bulk-enrich contacts and read LinkedIn posts through the Rodz API?
In short
Send up to 50,000 LinkedIn profiles to POST /api/v1/enrichment/contacts/bulk, then get the result by webhook or with GET /api/v1/enrichment/contacts/bulk/{batch_id}. A found profile costs 0.5 credit live and 0.25 cached. For posts, company-posts and profile-posts list them, and post-comments and post-reactions return the people who commented or reacted, at 0.5 credit per page for three of them.
Key points
- One
POST /api/v1/enrichment/contacts/bulkcall accepts 1 to 50,000 profiles; each found profile costs 0.5 credit withfreshness=liveand 0.25 credit withfreshness=cached. A profile that is not found is not charged. - Above 5,000 profiles, the reference recommends
deliveryMode: poll: a 50,000-profile batch weighs 50 to 150 MB, and you read it in pages instead of receiving it in a single push. - A batch’s results stay readable for 7 days after it finishes; after that, or for an unknown id, the API answers
404. company-posts,post-commentsandpost-reactionscost 0.5 credit per page, charged only if the page has results.
- Cost
- 0.25 to 0.5 credit per profile found in a batch; 0.5 credit per page for company-posts, post-comments and post-reactions (cost of profile-posts not specified)
- Setup time
- 30 min
Before you start
- A Rodz API key, created under Integrations → API in the dashboard (format
USR_...), stored in theRODZ_API_KEYvariable. - Credits on the account: an insufficient balance returns a
402response. - The URLs of the LinkedIn profiles to enrich. For posts, the URL of a company page or a profile, or the URL of a post.
- To receive a batch by webhook: an HTTPS URL that accepts a
POST. Without one, usepollmode. - Python 3 with the
requestslibrary (pip install requests), or justcurl.
Steps
-
Step 1. Start a batch enrichment
POST /api/v1/enrichment/contacts/bulktakes a JSON body withprofiles, 1 to 50,000 items. Each item carriesurl(the LinkedIn profile URL, required) andexternalId, your own reference, which you get back in the result.Three settings complete the body.
freshnessislive(the default: the profile is re-read at batch time, 0.5 credit per found profile) orcached(profile served from the cache, at most 8 days old, 0.25 credit, typically around a minute).deliveryModeiswebhook(the default) orpoll.webhookUrlis an HTTPS URL: required inwebhookmode, optional inpollmode.The API answers
202right away:data.batchIdidentifies the batch anddata.acceptedgives the number of profiles accepted. Profiles that are not found are not charged, and the price is the same by webhook or by polling.Start a batch in poll mode
curl -X POST "https://api.rodz.io/api/v1/enrichment/contacts/bulk" \ -H "Authorization: Bearer $RODZ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "profiles": [ {"externalId": "crm-123", "url": "https://www.linkedin.com/in/jane-doe"}, {"externalId": "crm-456", "url": "https://www.linkedin.com/in/john-smith"} ], "freshness": "cached", "deliveryMode": "poll" }' -
Step 2. Receive the batch by webhook or read it in pages
In
webhookmode, the API sends the full batch as aPOSTto yourwebhookUrlwhen processing ends:batchId,total,foundandresults. Inpollmode, nothing is pushed: you read the batch withGET /api/v1/enrichment/contacts/bulk/{batch_id}. If you also give awebhookUrlinpollmode, you receive only a small ready-notification, not the data.Reading also works as a fallback in
webhookmode, for example after a missed webhook.data.statusfollows the cyclepending,processing, thendoneorfailed;delivery_failedexists only inwebhookmode and means your server rejected the push although the enrichment finished. Poll every few seconds while the status ispendingorprocessing.resultsstays empty until the batch isdone, andtotalandfoundarenulluntil it ends.The
limitparameter sets the page size (1,000 by default, 10,000 at most). When results remain,data.nextCursoris set: send it back ascursorfor the next page. Each item ofresultscarriesexternalId,urlandperson.poll_bulk.py
import os import sys import time import requests BASE = "https://api.rodz.io/api/v1/enrichment" HEADERS = {"Authorization": f"Bearer {os.environ['RODZ_API_KEY']}"} batch_id = sys.argv[1] # the data.batchId received with the 202 params = {"limit": 1000} found = [] results = [] while True: response = requests.get( f"{BASE}/contacts/bulk/{batch_id}", headers=HEADERS, params=params, timeout=60, ) response.raise_for_status() data = response.json()["data"] if data["status"] in ("pending", "processing"): time.sleep(5) continue if data["status"] != "done": raise SystemExit(f"Batch ended with status {data['status']}") results.extend(data["results"]) for item in data["results"]: person = item.get("person") if person is None: print(item["externalId"], "not found", item.get("error")) else: print(item["externalId"], person["name"], person["headline"]) found.append(item["externalId"]) if not data["nextCursor"]: break params["cursor"] = data["nextCursor"] print(len(found), "profiles enriched") -
Step 3. Read the enriched profile and handle profiles without a result
Each
personis a full profile: identity (firstName,lastName,name,linkedInUrl,photoUrl), role (headline,seniority,jobFunction,subRole,industry), location (location,country,geoId), reach (followerCount,connectionsCount),linkedinSummary, skills (skillsList), languages (languages), current and past positions (currentCompanyDetail,pastCompaniesDetails, with the company’s details: industry, staff range, HQ, website) andeducation. Any field isnullwhen the profile does not have it.personisnull, or the key is missing, for a profile that is not found, and you will meet some in a batch: test it before reading fields. When a profile’s lookup could not complete,personis alsonulland the item carries an extraerrorwith the codeSERVICE_UNAVAILABLE. That profile is not charged, the rest of the batch is delivered, and you can submit it again later.A batch profile does not have the same shape as the one from
GET /api/v1/enrichment/contact: do not merge the two into one data model.languagesDetailandskillsDetailare free-form: read them defensively.retry_unavailable.py
# results: the list filled by poll_bulk.py to_retry = [ item for item in results if item.get("person") is None and (item.get("error") or {}).get("code") == "SERVICE_UNAVAILABLE" ] profiles = [ {"externalId": item["externalId"], "url": item["url"]} for item in to_retry ] print(len(profiles), "profiles to submit in a new batch") -
Step 4. List a company’s posts with company-posts
GET /api/v1/enrichment/company-postsreturns the LinkedIn posts of a company page, newest first. Pass one of these three parameters, at least one:company(the page URL),companyId(the LinkedIn id) orcompanyUniversalName(the last segment of the URL, the fastest form). With none of them, the API answers400withMISSING_PARAMETERS.scrapePostedLimitnarrows the time window:1h,24h,week,month,3months,6monthsoryear. To walk through pages, send the value ofdata.pagination.paginationTokenback inpaginationToken;pagealso allows numeric pagination.Each item of
data.elementscarriesid,linkedinUrl,content,author,postedAt(withdate),postImagesandengagement(likes,comments,sharesandreactions, a count per type). Thecommentsfield of each post is always an empty array: to read comments, usepost-comments. The call costs 0.5 credit per page; an empty page is returned without being charged.dataisnullwhen no post is found, andreasonthen gives the reason.company_posts.py
import os import requests BASE = "https://api.rodz.io/api/v1/enrichment" HEADERS = {"Authorization": f"Bearer {os.environ['RODZ_API_KEY']}"} params = {"companyUniversalName": "acme", "scrapePostedLimit": "month"} for _ in range(10): # 10 pages at most response = requests.get( f"{BASE}/company-posts", headers=HEADERS, params=params, timeout=60 ) response.raise_for_status() data = response.json()["data"] if not data or not data["elements"]: break for post in data["elements"]: posted_at = (post.get("postedAt") or {}).get("date") likes = (post.get("engagement") or {}).get("likes") print(posted_at, likes, post["linkedinUrl"]) token = (data.get("pagination") or {}).get("paginationToken") if not token: break params["paginationToken"] = token -
Step 5. List a person’s posts with profile-posts
GET /api/v1/enrichment/profile-postsdoes the same for a profile. Pass at least one of these parameters:profile(the profile URL),profileId(the LinkedIn id) orprofilePublicIdentifier(the last segment of the URL, the fastest). With none of them, the API answers400withMISSING_PARAMETERS.scrapePostedLimit,pageandpaginationTokenwork as forcompany-posts, and the response has the same shape. For a profile’s posts only, it addsdocument(an attached document or carousel),repostedByandrepostedAtwhen the item is a repost.postVideois part of the shape common to both routes, when the post carries a native video. The reference gives no cost for this route, so this guide announces none.Posts from the last month
curl -G "https://api.rodz.io/api/v1/enrichment/profile-posts" \ -H "Authorization: Bearer $RODZ_API_KEY" \ --data-urlencode "profilePublicIdentifier=jane-doe" \ --data-urlencode "scrapePostedLimit=month" -
Step 6. Read a post’s comments with post-comments
GET /api/v1/enrichment/post-commentsreturns the people who commented on a post, with their exact words.postis required: the LinkedIn post URL or its activity id.sortByisrelevance(the default) ordate.page(from 1) orpaginationTokenwalk through the pages.Each item of
data.elementsgivescommentId,commentUrl,id(the commenter’s LinkedIn id, not the comment’s),name,linkedinUrl,position,pictureUrl,commentText,createdAtandisAuthor. UsecommentIdas the de-duplication key: it is stable for a comment.position,pictureUrlandcreatedAtcan benull. When pages remain,data.pagination.paginationTokenis set; it is absent on the last one. The call costs 0.5 credit per page that returns commenters; an empty page is free.post_comments.py
import os import requests BASE = "https://api.rodz.io/api/v1/enrichment" HEADERS = {"Authorization": f"Bearer {os.environ['RODZ_API_KEY']}"} params = {"post": "https://www.linkedin.com/feed/update/urn:li:activity:1234567890", "sortBy": "date"} seen = set() while True: response = requests.get( f"{BASE}/post-comments", headers=HEADERS, params=params, timeout=60 ) response.raise_for_status() data = response.json()["data"] if not data or not data["elements"]: break for comment in data["elements"]: if comment["commentId"] in seen: continue seen.add(comment["commentId"]) print(comment["name"], comment["position"], comment["commentText"]) token = (data.get("pagination") or {}).get("paginationToken") if not token: break params["paginationToken"] = token -
Step 7. Read the reactions to a post with post-reactions
GET /api/v1/enrichment/post-reactionsreturns the people who reacted to a post.postis required (the post URL or its activity id), andpageandpaginationTokenwalk through the pages.Each item of
data.elementsgivesid,name,linkedinUrl,position,pictureUrlandreactionType, which isLIKE,PRAISE,EMPATHY,APPRECIATION,INTERESTorENTERTAINMENT. The next-page token is indata.pagination.paginationToken, absent on the last page. The call costs 0.5 credit per page that contains people; an empty page is free.Reactions to a post
curl -G "https://api.rodz.io/api/v1/enrichment/post-reactions" \ -H "Authorization: Bearer $RODZ_API_KEY" \ --data-urlencode "post=https://www.linkedin.com/feed/update/urn:li:activity:1234567890" -
Step 8. Handle refusals: parameters, credits, limits and unknown batches
400withMISSING_PARAMETERS(company-posts,profile-posts): no search parameter was supplied. Add at least one.402withNO_MORE_CREDITS: the balance does not cover the call. Nothing was looked up or charged. Top up the account and retry.422: a field is missing or invalid (for exampleprofilesfor the batch, orpostfor comments and reactions).404when reading a batch: the id is unknown for your account, it belongs to another account, or the results are more than 7 days old.429: more than 9,000 requests in the minute for this key.Retry-Aftergives the seconds left (1 to 60); wait, then send the same request again. A refused request is not charged.
Example payload
Response of GET /api/v1/enrichment/post-comments for one page of comments
{
"data": {
"elements": [
{
"commentId": "7469631311012577280",
"commentUrl": "https://www.linkedin.com/feed/update/urn:li:activity:1234567890?commentUrn=example",
"id": "ACoAAB1exampleProfileUrnZ",
"name": "Jane Doe",
"linkedinUrl": "https://www.linkedin.com/in/jane-doe",
"position": "VP Engineering at Acme",
"pictureUrl": "https://example.com/jane-doe.jpg",
"commentText": "Congrats on the launch, this is exactly what our team needed!",
"createdAt": "2026-05-31T15:02:00.000Z",
"isAuthor": false
}
],
"pagination": {
"paginationToken": "dXJuOmxpOmFjdGl2aXR5Ojc0NDU5Mzc2MjI3MTMyMjExMjA="
}
},
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
} Bulk enrichment answers a question of volume: “I have a list of LinkedIn profiles, what can I learn about them?”. The post routes answer another: “what does this company or person publish, and who reacts?”. The six routes in this guide share the API key, the rate limit and the credit balance of the account.
Frequently asked questions
Should I pick webhook or poll mode for a batch?
webhook mode is the simplest for small or medium batches: the full batch arrives as a POST on your webhookUrl. Above 5,000 profiles, the reference recommends poll: a 50,000-profile batch is 50 to 150 MB, which many servers reject or time out on. In poll mode, you read the batch in pages with limit and cursor.
What does a batch cost, and what happens to profiles that are not found?
Each found profile costs 0.5 credit with live and 0.25 credit with cached. A profile that is not found is not charged, nor is one whose lookup could not complete (error with SERVICE_UNAVAILABLE). The price is the same by webhook or by polling.
What is the difference between live and cached for a batch?
live re-reads each profile at batch time: the data is the most recent, but processing is slower, especially for a large batch. cached answers from the cache: half price, typically around a minute, with profiles at most 8 days old.
What if my server missed the webhook?
Read the batch with GET /api/v1/enrichment/contacts/bulk/{batch_id}: this route also works as a fallback in webhook mode, and the cost does not change. The delivery_failed status means the enrichment finished but your server kept rejecting the push. The spec does not say whether results can be read in that state.
How do I read the comments of the posts I find with company-posts?
A post’s comments field is always an empty array in post lists, whatever engagement.comments says. Pass the post URL (linkedinUrl) as post to post-comments; post-reactions returns the people who reacted in the same way.
How much does profile-posts cost?
The API reference gives no cost for this route, so this guide announces none.