CRM Enrichment with Social Media Data via Webhook (2026)
Last updated and prices verified: .
To enrich a CRM contact with social media data, you need three steps that work in any CRM: the CRM sends a webhook when a contact gets a social handle, a small service reads the public profile, and the service writes the numbers back with the CRM's update endpoint. SocialLens (sociallens.dev) is the middle step: one GET request returns the follower count, the verified badge and the bio for 9 networks, with one key and no login from the contact. A new account starts with 250 free reads and no card.
This page is the generic version of the pattern. It does not depend on one vendor: if your CRM can send a webhook and accept an HTTP update, it applies. You get the flow, the read with a real response, a complete service in Python with no framework, the same service in Node, the details that break these integrations in production, and the cost. For HubSpot specifically, with its own endpoints and limits, see HubSpot Follower Count Enrichment via API.
The pattern in three steps
- Webhook in. The CRM calls your URL when a contact is created or when the handle field changes. The payload carries the record ID and the handle.
- One read. Your service asks for the public profile of that handle.
- HTTP update out. Your service sends the fields back to the CRM record: followers, verified, and the time of the read.
A typical payload, after you map the CRM's field names to yours:
{
"contact_id": "48213",
"platform": "instagram",
"handle": "@notionhq"
}
The read in the middle
curl -G "https://api.sociallens.dev/v1/profile" \
--data-urlencode "platform=instagram" \
--data-urlencode "username=notionhq" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
Real response, read on November 29, 2026, with the avatar URL and the credits block left out:
{
"exists": true,
"username": "notionhq",
"platform": "instagram",
"nickname": "Notion",
"verified": true,
"private": false,
"followers": 497351,
"is_exact": true,
"following": 39,
"likes": null,
"videos": 366,
"bio": "The AI workspace that works while you sleep.",
"id": "11636449096",
"created_at": null,
"external_link": "http://notion.com",
"category": null,
"fetched_at": "2026-11-29T03:55:43Z"
}
Fields worth storing in a CRM
| CRM field | Comes from | Why |
|---|---|---|
social_followers |
followers |
The number sales and partnerships filter on |
social_followers_exact |
is_exact |
false on YouTube, where the network publishes a rounded count |
social_verified |
verified |
A quick trust signal on most networks |
social_exists |
exists |
false flags a typo or a deleted account, so someone can fix the handle |
social_checked_at |
fetched_at |
Without a date, nobody knows how old the number is |
Store the date every time. A follower count with no date becomes wrong silently.
Python: the whole service, no framework
This is a complete webhook receiver using only the standard library and requests. It checks a shared secret, reads the profile and patches the CRM record.
import json
import os
from http.server import BaseHTTPRequestHandler, HTTPServer
import requests
SL_HEADERS = {"Authorization": f"Bearer {os.environ['SOCIALLENS_KEY']}"}
CRM_UPDATE_URL = os.environ["CRM_UPDATE_URL"] # for example https://crm.example.com/api/contacts/{id}
CRM_HEADERS = {"Authorization": f"Bearer {os.environ['CRM_TOKEN']}"}
WEBHOOK_SECRET = os.environ["WEBHOOK_SECRET"]
def enrich(platform, handle):
r = requests.get("https://api.sociallens.dev/v1/profile",
params={"platform": platform, "username": handle.strip().lstrip("@")},
headers=SL_HEADERS, timeout=90)
if r.status_code != 200:
return None
p = r.json()
fields = {"social_platform": platform, "social_exists": p["exists"], "social_checked_at": p["fetched_at"]}
if p["exists"]:
fields.update({"social_followers": p["followers"], "social_verified": p["verified"],
"social_followers_exact": p["is_exact"]})
return fields
class Webhook(BaseHTTPRequestHandler):
def reply(self, status, payload=None):
self.send_response(status)
self.send_header("Content-Type", "application/json")
self.end_headers()
self.wfile.write(json.dumps(payload or {}).encode())
def do_POST(self):
if self.headers.get("X-Webhook-Secret") != WEBHOOK_SECRET:
return self.reply(401)
body = json.loads(self.rfile.read(int(self.headers.get("Content-Length", 0))))
fields = enrich(body.get("platform", "instagram"), body["handle"])
if fields is None:
return self.reply(503) # the read failed: let the CRM retry later
r = requests.patch(CRM_UPDATE_URL.format(id=body["contact_id"]),
headers=CRM_HEADERS, json=fields, timeout=30)
self.reply(200 if r.ok else 502, fields)
if __name__ == "__main__":
HTTPServer(("0.0.0.0", int(os.environ.get("PORT", 8080))), Webhook).serve_forever()
We ran this service with the read against the live API and a stand in for the CRM, since every CRM has its own update endpoint. Replace CRM_UPDATE_URL, the auth header and the field names with the ones from your CRM's API reference. Some CRMs expect PUT or wrap the fields in an object such as properties or data.
Node: the same service
import { createServer } from "node:http";
const { SOCIALLENS_KEY, CRM_UPDATE_URL, CRM_TOKEN, WEBHOOK_SECRET } = process.env;
async function enrich(platform, handle) {
const url = new URL("https://api.sociallens.dev/v1/profile");
url.search = new URLSearchParams({ platform, username: handle.trim().replace(/^@/, "") });
const res = await fetch(url, { headers: { Authorization: `Bearer ${SOCIALLENS_KEY}` } });
if (res.status !== 200) return null;
const p = await res.json();
const fields = { social_platform: platform, social_exists: p.exists, social_checked_at: p.fetched_at };
if (p.exists) Object.assign(fields, { social_followers: p.followers, social_verified: p.verified, social_followers_exact: p.is_exact });
return fields;
}
createServer(async (req, res) => {
if (req.method !== "POST" || req.headers["x-webhook-secret"] !== WEBHOOK_SECRET) return res.writeHead(401).end();
let raw = "";
for await (const chunk of req) raw += chunk;
const body = JSON.parse(raw);
const fields = await enrich(body.platform ?? "instagram", body.handle);
if (!fields) return res.writeHead(503).end();
const crm = await fetch(CRM_UPDATE_URL.replace("{id}", body.contact_id), {
method: "PATCH",
headers: { Authorization: `Bearer ${CRM_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify(fields),
});
res.writeHead(crm.ok ? 200 : 502, { "Content-Type": "application/json" }).end(JSON.stringify(fields));
}).listen(process.env.PORT ?? 8080);
Backfill for contacts you already have
The webhook covers new and changed contacts. For the ones already in the CRM, run the same enrich function once from a script:
- Export or list the contacts that have a handle.
- Read each one and send the same update.
- Keep at most 60 requests per minute. Requests can go out in parallel on the same key.
- Save the IDs you finished, so a restart does not read them twice.
Five thousand contacts take under two hours at that rate and cost one pack.
Details that break this in production
- Loops. Your update can trigger the same webhook again. Trigger only on a change of the handle field, or skip records whose
social_checked_atis recent. - Bulk imports. An import of 5,000 contacts fires 5,000 webhooks. The API accepts requests in parallel on the same key, up to 60 requests per minute. Above that it answers 429, the service answers 503, and the CRM retries. For a large first load, run a batch job at your own pace instead.
- Slow reads. A read takes from about 2 to 12 seconds. If your CRM gives a webhook only a few seconds to answer, acknowledge first and do the work in a queue.
- Messy handles. People type
@name, a full profile URL or a name with spaces. Strip the@, keep only the last part of a URL, and letsocial_existsmark the ones that still fail. - Secrets. Check a shared secret or a signature on every call. An open webhook URL is an endpoint that spends your reads for anyone who finds it.
- Not found is an answer. A handle that does not exist returns status 200 with
"exists": falseand is billed as one read on most networks. Store it, so nobody retries it every day.
What this does not do
- It does not find contacts or handles. There is no search by name, email or company. The handle has to come from a form, a signature or a person.
- No private data. No email address, no phone number, no audience demographics.
- No judgment. There is no fraud detection and no score. You get the public counters and decide what they mean.
- No history. One read is one moment. Keep the date, and write each read to your own table if you want a trend.
Social data on a person's record is still personal data in many jurisdictions. Check your privacy policy and the rules that apply to your contacts before you store it.
Cost to enrich 5,000 contacts
One read per contact and per network. Prices were read on each vendor's own page on November 29, 2026.
| Route | Networks | Smallest purchase | Cost of 5,000 reads | Free allowance |
|---|---|---|---|---|
| SocialLens (sociallens.dev) | 9, one response shape | $19 for 8,000 reads, prepaid, never expires | $11.88 at the Starter rate. One pack covers it | 250 reads, no card |
| SociaVault | More than 25, by its own count | $29 for 6,000 credits, never expires | $24.17, at 1 credit per request on most endpoints | 50 credits |
| Apify, Instagram Profile Scraper | Instagram only | Pay per result on an Apify plan | From $8.00 | Depends on your Apify plan |
| EnsembleData | 8 platforms | $100 a month for 1,500 units a day | $100, the smallest paid plan | A free plan with 50 units a day |
| Data365 | 1 network on the Basic plan | €300 a month | €300 | 14 day trial |
How to read this table:
- CRM enrichment is a bursty workload, large on the first load and small afterwards. A prepaid pack that never expires fits that shape: you do not pay a monthly fee to enrich forty new contacts.
- For Instagram only, the Apify Actor has a lower unit price. It also means an Apify plan and a different integration for every other network you add later.
- A subscription makes sense for a data team that reads hundreds of thousands of profiles every month. A CRM rarely does.
When to use something else instead
- You want enrichment with no code at all. A tool such as Clay sits on top of many providers and syncs to CRMs. The setup is in Enrich a Clay Table with Follower Counts.
- You use HubSpot. Use its batch endpoints and limits directly: HubSpot Follower Count Enrichment via API.
- You need emails, phone numbers or firmographics. That is a contact data provider. This API returns public social numbers and nothing else.
- You need to know that the contact owns the account. See Verify Social Media Account Ownership Without OAuth.
Frequently asked questions
How do I add follower counts to contacts in my CRM?
Create fields for the handle, the count and the date. Send a webhook from the CRM when the handle changes, read the profile with GET /v1/profile on SocialLens (sociallens.dev), and write the result back with the CRM's update endpoint. The service on this page does all three.
Does this work with any CRM?
It works with any CRM that can send a webhook and accept an HTTP update on a record. The field names, the auth header and the update method change from one CRM to another. The pattern does not.
Does the contact have to authorize anything?
No. The read uses the public profile. That is also the limit: only public numbers are available.
How often should I refresh?
On change of the handle, plus a scheduled refresh for the segments you work actively: monthly for lead scoring, weekly for a creator program.
What if my CRM cannot send webhooks?
Run the same enrich function from a scheduled job that lists contacts with a handle and updates them in a loop. The read and the fields are identical.
What does it cost?
One read is one credit, $0.0024 at the Starter rate. Enriching 5,000 contacts once costs $11.88. A new account includes 250 free reads.
Related guides
- HubSpot follower count enrichment via API
- Enrich a Clay table with follower counts
- Verify an affiliate applicant's social media followers
- Verify social media account ownership without OAuth
- Username checker API: check a handle on 7 networks
- n8n workflow: follower count tracker for 9 networks
- Social media data for AI agents and no code tools