Data Enrich API v1 Home

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.

Base URL https://api.dataenrich.tech Auth x-api-key Format JSON OpenAPI spec

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.

MethodEndpointReturns
POST/linkedin/v1/profilesA public profile
POST/linkedin/v1/profiles/metricsProfile social metrics
POST/linkedin/v1/postsA user's posts
POST/linkedin/v1/posts/searchPosts matching a keyword
POST/linkedin/v1/post-detailsA single post
POST/linkedin/v1/post-commentsComments on a post
POST/linkedin/v1/user-commentsComments a user made
GET/youtube/v1/searchSearch YouTube videos
GET/youtube/v1/channelChannel information
GET/youtube/v1/channel/videosVideos from a channel
GET/youtube/v1/videoVideo details
GET/youtube/v1/video/commentsComments on a video
GET/youtube/v1/channel/shortsShorts from a channel
GET/youtube/v1/channel/livesLive streams from a channel
GET/youtube/v1/channel/playlistsPlaylists 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.

i

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.

StatusCodeMeaning
400bad_requestMissing or malformed body
401unauthorizedMissing or invalid API key
404not_foundNo data for that URL
429too_many_requestsEase concurrency and retry
5xxserver_errorSafe to retry with backoff
Example error
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key.",
    "status": 401
  }
}

Pagination #

All endpoints mention their pagination strategy in their specific doc

LinkedIn

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

FieldTypeDescription
urlstringrequiredPublic LinkedIn profile URL.
Request
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" }'
Response
{
  "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

FieldTypeDescription
urlstringrequiredPublic LinkedIn profile URL.
Request
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" }'
Response
{
  "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

FieldTypeDescription
urnstringrequiredPublic LinkedIn profile urn for individuals and not for company.
paginationTokenstringoptionalPagination cursor from a previous response.
sizeintoptionalNumber of results to be returned in single api call.
Request
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 }'
Response
{
  "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

FieldTypeDescription
urlstringone ofPublic LinkedIn post URL.
commentsbooleanoptionalInclude the comments array. Defaults to true.
reactionsbooleanoptionalInclude the reactions array. Defaults to true.
Request
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 }'
Response
{
  "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

FieldTypeDescription
keywordstringrequiredSearch term.
sortstringoptionalRELEVANCE or DATE_POSTED. Defaults to RELEVANCE.
datePostedstringoptionalPAST_24_HOURS, PAST_WEEK, or PAST_MONTH.
fromCompanystring[]optionalRestrict to authors by company entity URN (numeric strings).
mentionsPersonstring[]optionalPosts mentioning these person entity URNs.
mentionsCompanystring[]optionalPosts mentioning these company entity URNs (numeric strings).
pageintegeroptionalPage number, from 0. Defaults to 0.
sizeintegeroptionalResults per page, 1 to 50. Defaults to 10.
Request
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 }'
Response
{
  "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

FieldTypeDescription
urnstringrequiredThe post URN, for example urn:li:activity:7376356221991178240.
pageintegeroptionalZero-based page number. Defaults to 0.
sizeintegeroptionalItems per page. Defaults to 10.
Request
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 }'
Response
{
  "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

FieldTypeDescription
urnstringrequiredPublic LinkedIn profile urn for individuals and not for company.
paginationTokenstringoptionalPagination cursor from a previous response.
sizeintoptionalNumber of results to be returned in single api call.
Request
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 }'
Response
{
  "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

FieldTypeDescription
querystringrequiredSearch term.
sort_bystringoptionalSort results by relevance or upload date.
durationstringoptionalFilter by video duration (short, medium, long).
regionstringoptionalFilter by region code.
typestringoptionalContent type filter (video, playlist, channel).
upload_datestringoptionalFilter by upload date range.
continuation_tokenstringoptionalPagination cursor for next set of results.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/search' \
  '?query=machine+learning&sort_by=relevance' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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

FieldTypeDescription
urlstringone ofYouTube channel URL.
handlestringone ofYouTube channel handle (@username).
channel_idstringone ofYouTube channel ID.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/channel?handle=@google' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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

FieldTypeDescription
handlestringone ofYouTube channel handle (@username).
channel_idstringone ofYouTube channel ID.
sortstringoptionalSort order (newest, popular, oldest).
is_paid_promotionsstringoptionalFilter for paid promotions.
continuation_tokenstringoptionalPagination cursor for next set of results.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/channel/videos' \
  '?handle=@google&sort=newest' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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

FieldTypeDescription
urlstringrequiredYouTube video URL.
languagestringoptionalPreferred language for captions and metadata.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/video' \
  '?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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

FieldTypeDescription
urlstringrequiredYouTube video URL.
orderstringoptionalSort order (relevance, time).
continuation_tokenstringoptionalPagination cursor for next set of results.
Request
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"
Response
{
  "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

FieldTypeDescription
handlestringone ofYouTube channel handle (@username).
channel_idstringone ofYouTube channel ID.
sortstringoptionalSort order (newest, popular, oldest).
continuation_tokenstringoptionalPagination cursor for next set of results.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/channel/shorts' \
  '?handle=@google&sort=newest' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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

FieldTypeDescription
handlestringone ofYouTube channel handle (@username).
channel_idstringone ofYouTube channel ID.
continuation_tokenstringoptionalPagination cursor for next set of results.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/channel/lives' \
  '?handle=@google' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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

FieldTypeDescription
handlestringone ofYouTube channel handle (@username).
channel_idstringone ofYouTube channel ID.
continuation_tokenstringoptionalPagination cursor for next set of results.
Request
curl -X GET \
  'https://api.dataenrich.tech' \
  '/youtube/v1/channel/playlists' \
  '?handle=@google' \
  -H "x-api-key: YOUR_KEY"
Response
{
  "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=="
}
No sections match your filter.