Data Enrich API Reference
One REST API for public LinkedIn and YouTube data. Fetch profiles, posts, comments, videos, channels, and more through multiple endpoints, each authenticated with a single header.
Introduction #
Data Enrich returns structured public LinkedIn data. Every endpoint is a POST to https://api.dataenrich.tech with a JSON body and your API key in the x-api-key header. Responses are JSON.
| Method | Endpoint | Returns |
|---|---|---|
| POST | /linkedin/v1/profiles | A public profile |
| POST | /linkedin/v1/profiles/metrics | Profile social metrics |
| POST | /linkedin/v1/posts | A user's posts |
| POST | /linkedin/v1/posts/search | Posts matching a keyword |
| POST | /linkedin/v1/post-details | A single post |
| POST | /linkedin/v1/post-comments | Comments on a post |
| POST | /linkedin/v1/user-comments | Comments a user made |
| GET | /youtube/v1/search | Search YouTube videos |
| GET | /youtube/v1/channel | Channel information |
| GET | /youtube/v1/channel/videos | Videos from a channel |
| GET | /youtube/v1/video | Video details |
| GET | /youtube/v1/video/comments | Comments on a video |
| GET | /youtube/v1/channel/shorts | Shorts from a channel |
| GET | /youtube/v1/channel/lives | Live streams from a channel |
| GET | /youtube/v1/channel/playlists | Playlists from a channel |
Authentication #
Authenticate every request with your secret key in the x-api-key header. Keep it server side. Create and roll keys from your dashboard.
Requests over plain HTTP are rejected. Always call over HTTPS. A missing or invalid key returns 401 unauthorized.
Errors #
Data Enrich uses standard HTTP status codes. Error bodies include a machine-readable code and a human-readable message.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | Missing or malformed body |
| 401 | unauthorized | Missing or invalid API key |
| 404 | not_found | No data for that URL |
| 429 | too_many_requests | Ease concurrency and retry |
| 5xx | server_error | Safe to retry with backoff |
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"status": 401
}
}
Pagination #
All endpoints mention their pagination strategy in their specific doc
Fetch LinkedIn profiles, posts, and comments through POST endpoints.
Get profile #
POST /linkedin/v1/profiles
Returns the public profile behind a LinkedIn profile URL: headline, location, follower and connection counts, current position, experience, education, and skills.
Body
| Field | Type | Description | |
|---|---|---|---|
| url | string | required | Public LinkedIn profile URL. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/profiles \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "url": \ "https://www.linkedin.com/in/jordan-rivera" }'
{
"url": "https://www.linkedin.com/in/jordan-rivera",
"name": "Jordan Rivera",
"headline": "Head of Growth at Northwind Labs",
"location": "Austin, TX",
"followers": 18400,
"connections": 4200,
"current_position": { "title": "Head of Growth", "company": "Northwind Labs" },
"experience": [ { "title": "Head of Growth", "company": "Northwind Labs", "start": "2022-03", "current": true } ],
"education": [ { "school": "UT Austin", "degree": "BBA" } ],
"skills": ["Growth Marketing", "SQL", "Lifecycle"]
}
Get profile metrics #
POST /linkedin/v1/profiles/metrics
Returns the public profile social metrics of a LinkedIn profile URL: followers, connections, is_verified.
Body
| Field | Type | Description | |
|---|---|---|---|
| url | string | required | Public LinkedIn profile URL. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/profiles/metrics \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "url": \ "https://www.linkedin.com/in/jordan-rivera" }'
{
"verified": true,
"followersCount": 18400,
"connectionsCount": 4200
}
User posts #
POST /linkedin/v1/posts
Returns a user's public posts, newest first, with engagement counts. Paginated.
Body
| Field | Type | Description | |
|---|---|---|---|
| urn | string | required | Public LinkedIn profile urn for individuals and not for company. |
| paginationToken | string | optional | Pagination cursor from a previous response. |
| size | int | optional | Number of results to be returned in single api call. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/posts \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "urn": \ "ACoAAB0cMPYBZu0FI47tswI8zRpnLyQLQ9H_-9U", \ "size": 10 }'
{
"content": [
{
"id": "urn:li:activity:7362205762783252480",
"commentary": "Big thanks to Jordie Kern and the whole crew at 7 Eagle Group...",
"totalComments": 2,
"totalReactions": 20,
"totalShares": 0,
"reactionType": { "like": 20 },
"url": "https://www.linkedin.com/feed/update/urn:li:activity:7362205762783252480"
}
],
"paginationToken": "dXJuOmxpOmFjdGl2aXR5OjczNTU2MzgzNzEyNDQ3OTc5NTItMTc1MzcyMDg0ODgyMA=="
}
Post details #
POST /linkedin/v1/post-details
Full detail of a single post by its URL or URN: the author, commentary, reaction breakdown, and optionally the individual comments and reactions, plus any attached content (article, image, video, poll).
Body
| Field | Type | Description | |
|---|---|---|---|
| url | string | one of | Public LinkedIn post URL. |
| comments | boolean | optional | Include the comments array. Defaults to true. |
| reactions | boolean | optional | Include the reactions array. Defaults to true. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/post-details \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "url": \ "https://www.linkedin.com/posts/williamhgates_...", \ "comments": true, \ "reactions": true }'
{
"urn": "urn:li:activity:7361200000000000000",
"threadUrn": "urn:li:ugcPost:7361200000000000000",
"commentary": "We shipped multi-touch attribution today. Here is what we learned.",
"numComments": 37, "numReactions": 214,
"reactionType": { "like": 180, "appreciation": 20, "praise": 14 },
"shareUrl": "https://www.linkedin.com/posts/jordan-rivera_growth-activity-7361200000000000000",
"actor": {
"profileId": "jordan-rivera", "entityUrn": "ACoAAB1a2cRs...",
"firstName": "Jordan", "lastName": "Rivera",
"headline": "Head of Growth at Northwind Labs", "profileType": "PERSON"
},
"comments": [
{
"id": "urn:li:comment:(ugcPost:7361200000000000000,7361300000000000000)",
"comment": "Great breakdown, thanks for sharing.",
"totalComments": 1, "totalReactions": 8, "reactionType": { "like": 8 },
"commenter": { "profileId": "priya-nair", "firstName": "Priya", "lastName": "Nair", "headline": "VP Lifecycle at Beacon", "profileType": "PERSON" }
}
],
"reactions": [
{ "reaction": "LIKE", "reactor": { "profileId": "sam-lee", "firstName": "Sam", "lastName": "Lee", "headline": "VP Marketing at Beacon", "profileType": "PERSON" } }
],
"content": {
"image": null, "video": null,
"article": { "urn": "urn:li:linkedInArticle:7361100000000000000", "title": "How we rebuilt attribution", "subtitle": "Jordan Rivera" },
"poll": null
},
"sponsored": false
}
Search posts #
POST /linkedin/v1/posts/search
Search public posts by keyword, with filters for sort order, recency, content type, author, and mentions. Page-based pagination, up to 50 results per page.
Body
| Field | Type | Description | |
|---|---|---|---|
| keyword | string | required | Search term. |
| sort | string | optional | RELEVANCE or DATE_POSTED. Defaults to RELEVANCE. |
| datePosted | string | optional | PAST_24_HOURS, PAST_WEEK, or PAST_MONTH. |
| fromCompany | string[] | optional | Restrict to authors by company entity URN (numeric strings). |
| mentionsPerson | string[] | optional | Posts mentioning these person entity URNs. |
| mentionsCompany | string[] | optional | Posts mentioning these company entity URNs (numeric strings). |
| page | integer | optional | Page number, from 0. Defaults to 0. |
| size | integer | optional | Results per page, 1 to 50. Defaults to 10. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/posts/search \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "keyword": "attribution", \ "sort": "RELEVANCE", \ "datePosted": "PAST_WEEK", \ "page": 0, "size": 10 }'
{
"content": [
{
"urn": "urn:li:activity:7429959579599532032",
"threadUrn": "urn:li:ugcPost:7429959517250936832",
"commentary": "How we rebuilt multi-touch attribution, a 3-minute walkthrough.",
"numComments": 16, "numReactions": 108,
"reactionType": { "like": 101, "appreciation": 3, "interest": 2, "empathy": 2 },
"shareUrl": "https://www.linkedin.com/posts/northwind-labs_attribution-activity-7429959579599532032",
"actor": { "id": 8179519, "name": "Northwind Labs", "url": "https://www.linkedin.com/company/northwind-labs/", "followerCount": 48200, "profileType": "COMPANY" },
"content": {
"image": null,
"video": { "duration": 80833, "thumbnail": "https://media.licdn.com/.../thumb.jpg", "videos": [ { "url": "https://dms.licdn.com/.../720p.mp4", "mediaType": "video/mp4", "width": 886, "height": 494 } ] },
"article": null, "document": null, "poll": null
}
}
],
"pageable": { "pageNumber": 0, "pageSize": 10, "offset": 0, "paged": true },
"totalElements": 268, "totalPages": 27,
"first": true, "last": false, "size": 10, "number": 0, "numberOfElements": 10, "empty": false
}
Post comments #
POST /linkedin/v1/post-comments
Returns the comments or reactions on a public post, identified by its post URN. Set type to choose which. Results are paged with page and size.
Body
| Field | Type | Description | |
|---|---|---|---|
| urn | string | required | The post URN, for example urn:li:activity:7376356221991178240. |
| page | integer | optional | Zero-based page number. Defaults to 0. |
| size | integer | optional | Items per page. Defaults to 10. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/post-comments \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "urn": \ "urn:li:activity:7376356221991178240", \ "page": 0, "size": 10 }'
{
"content": [
{
"id": "urn:li:comment:(ugcPost:7376356221513150464,7376367051826917376)",
"comment": "In United States 70% of people diagnosed with a complicated condition are more afraid of financial ruin than dying from the disease...",
"totalComments": 15,
"totalReactions": 116,
"reactionType": { "empathy": 6, "like": 97, "interest": 5, "entertainment": 1, "appreciation": 1, "praise": 6 },
"url": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7376356221513150464...",
"commenter": {
"profileId": "moniuszko",
"firstName": "Anna M 🕸️",
"lastName": "Moniuszko",
"headline": "Nothing I create Defines me.",
"profilePicture": "https://media.licdn.com/dms/image/v2/..."
}
}
],
"pageable": { "pageNumber": 0, "pageSize": 2, "offset": 0, "paged": true },
"last": false,
"totalElements": 627,
"totalPages": 314,
"first": true,
"size": 2,
"number": 0,
"numberOfElements": 2,
"empty": false
}
User comments #
POST /linkedin/v1/user-comments
Returns the comments a user has written on other posts, with a reference to each post. Paginated.
Body
| Field | Type | Description | |
|---|---|---|---|
| urn | string | required | Public LinkedIn profile urn for individuals and not for company. |
| paginationToken | string | optional | Pagination cursor from a previous response. |
| size | int | optional | Number of results to be returned in single api call. |
curl -X POST \ https://api.dataenrich.tech/linkedin/v1/user-comments \ -H "x-api-key: YOUR_KEY" \ -H "content-type: application/json" \ -d '{ "urn": \ "ACoAAB0cMPYBZu0FI47tswI8zRpnLyQLQ9H_-9U", \ "size": 2 }'
{
"content": [
{
"post": {
"id": "urn:li:activity:7348377193510539264",
"commentary": "🛣️ The Road Ahead After years in the military, I'm stepping into a new chapter...",
"totalComments": 2,
"totalReactions": 17
},
"comments": [
{
"id": "urn:li:comment:(activity:7348377193510539264,7348735945459871746)",
"comment": "Jordie Kern I'd definitely be interested. I plan on starting school...",
"totalComments": 0,
"totalReactions": 0
}
]
}
],
"paginationToken": "dXJuOmxpOmFjdGl2aXR5OjczNDg3MzU5ODA5ODk3MzkwMDktMTc1MjA3NTE4MjMwOQ=="
}
YouTube
Fetch YouTube videos, channels, comments, and more through GET endpoints with optional filters and pagination support.
Search videos #
GET /youtube/v1/search
Search public YouTube videos by query with optional filters for sort order, duration, region, content type, and upload date.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| query | string | required | Search term. |
| sort_by | string | optional | Sort results by relevance or upload date. |
| duration | string | optional | Filter by video duration (short, medium, long). |
| region | string | optional | Filter by region code. |
| type | string | optional | Content type filter (video, playlist, channel). |
| upload_date | string | optional | Filter by upload date range. |
| continuation_token | string | optional | Pagination cursor for next set of results. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/search' \ '?query=machine+learning&sort_by=relevance' \ -H "x-api-key: YOUR_KEY"
{
"videos": [
{
"type": "video",
"id": "qYNweeDHiyU",
"url": "https://www.youtube.com/watch?v=qYNweeDHiyU",
"title": "AI, Machine Learning, Deep Learning and Generative AI Explained",
"thumbnail": "https://i.ytimg.com/vi/qYNweeDHiyU/hq720.jpg",
"channel": {
"id": "UCKWaEZ-_VweaEx1j62do_vQ",
"title": "IBM Technology",
"handle": "IBMTechnology",
"thumbnail": "https://yt3.ggpht.com/7qCmNHAsFvD6RSINuJ1WoGZYoKmm7TDn..."
},
"viewCountText": "3,384,173 views",
"viewCountInt": 3384173,
"publishedTimeText": "1 year ago",
"lengthText": "10:01",
"lengthSeconds": 601
}
]
}
Get channel #
GET /youtube/v1/channel
Retrieve detailed information about a YouTube channel by URL, handle, or channel ID.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| url | string | one of | YouTube channel URL. |
| handle | string | one of | YouTube channel handle (@username). |
| channel_id | string | one of | YouTube channel ID. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/channel?handle=@google' \ -H "x-api-key: YOUR_KEY"
{
"id": "UCxmkWplsTn-4EvMKo7Yj-Zg",
"title": "Google",
"handle": "@google",
"url": "https://www.youtube.com/@google",
"description": "Channel description",
"subscriberCountText": "46.5M subscribers",
"viewCountText": "50B+ views",
"videoCountText": "5K+ videos",
"thumbnail": "https://yt3.ggpht.com/..."
}
Get channel videos #
GET /youtube/v1/channel/videos
Retrieve videos uploaded by a YouTube channel, with optional filtering and sorting.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| handle | string | one of | YouTube channel handle (@username). |
| channel_id | string | one of | YouTube channel ID. |
| sort | string | optional | Sort order (newest, popular, oldest). |
| is_paid_promotions | string | optional | Filter for paid promotions. |
| continuation_token | string | optional | Pagination cursor for next set of results. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/channel/videos' \ '?handle=@google&sort=newest' \ -H "x-api-key: YOUR_KEY"
{
"videos": [
{
"id": "dQw4w9WgXcQ",
"title": "Video title",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hq720.jpg",
"viewCountText": "1.2M views",
"publishedTimeText": "2 weeks ago",
"lengthText": "12:34",
"lengthSeconds": 754
}
],
"continuation_token": "CKIEAA=="
}
Get video details #
GET /youtube/v1/video
Retrieve comprehensive details about a specific YouTube video including metadata, statistics, and content information.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| url | string | required | YouTube video URL. |
| language | string | optional | Preferred language for captions and metadata. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/video' \ '?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \ -H "x-api-key: YOUR_KEY"
{
"id": "dQw4w9WgXcQ",
"title": "Video title",
"description": "Video description",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hq720.jpg",
"channel": { "id": "...", "title": "..." },
"viewCount": 1234567,
"likeCount": 67890,
"commentCount": 12345,
"publishedAt": "2023-01-01T00:00:00Z",
"lengthSeconds": 754
}
Get video comments #
GET /youtube/v1/video/comments
Retrieve comments from a specific YouTube video with optional sorting and pagination.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| url | string | required | YouTube video URL. |
| order | string | optional | Sort order (relevance, time). |
| continuation_token | string | optional | Pagination cursor for next set of results. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/video/comments' \ '?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \ '&order=relevance' \ -H "x-api-key: YOUR_KEY"
{
"comments": [
{
"id": "Ugx1234567890",
"author": "Username",
"text": "Great video!",
"likeCount": 42,
"publishedAt": "2023-01-01T00:00:00Z",
"replyCount": 3
}
],
"continuation_token": "CKIEAA=="
}
Get channel shorts #
GET /youtube/v1/channel/shorts
Retrieve YouTube Shorts (short-form videos) from a specific channel.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| handle | string | one of | YouTube channel handle (@username). |
| channel_id | string | one of | YouTube channel ID. |
| sort | string | optional | Sort order (newest, popular, oldest). |
| continuation_token | string | optional | Pagination cursor for next set of results. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/channel/shorts' \ '?handle=@google&sort=newest' \ -H "x-api-key: YOUR_KEY"
{
"shorts": [
{
"id": "abcdef1234",
"title": "Shorts video",
"url": "https://www.youtube.com/shorts/abcdef1234",
"thumbnail": "https://i.ytimg.com/vi/abcdef1234/hq720.jpg",
"viewCountText": "100K views",
"publishedTimeText": "1 week ago"
}
],
"continuation_token": "CKIEAA=="
}
Get channel live streams #
GET /youtube/v1/channel/lives
Retrieve live streams and past broadcasts from a YouTube channel.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| handle | string | one of | YouTube channel handle (@username). |
| channel_id | string | one of | YouTube channel ID. |
| continuation_token | string | optional | Pagination cursor for next set of results. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/channel/lives' \ '?handle=@google' \ -H "x-api-key: YOUR_KEY"
{
"lives": [
{
"id": "livestream123",
"title": "Live broadcast",
"url": "https://www.youtube.com/watch?v=livestream123",
"status": "completed",
"thumbnail": "https://i.ytimg.com/vi/livestream123/hq720.jpg",
"viewCountText": "5.2K views",
"publishedTimeText": "3 days ago"
}
],
"continuation_token": "CKIEAA=="
}
Get channel playlists #
GET /youtube/v1/channel/playlists
Retrieve playlists created by a YouTube channel.
Query Parameters
| Field | Type | Description | |
|---|---|---|---|
| handle | string | one of | YouTube channel handle (@username). |
| channel_id | string | one of | YouTube channel ID. |
| continuation_token | string | optional | Pagination cursor for next set of results. |
curl -X GET \ 'https://api.dataenrich.tech' \ '/youtube/v1/channel/playlists' \ '?handle=@google' \ -H "x-api-key: YOUR_KEY"
{
"playlists": [
{
"id": "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf",
"title": "Playlist name",
"url": "https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf",
"thumbnail": "https://i.ytimg.com/vi/video123/hq720.jpg",
"videoCountText": "25 videos",
"videoCountInt": 25
}
],
"continuation_token": "CKIEAA=="
}