Person Newsfeed API

Get someone's recent social media posts from LinkedIn, Twitter, Instagram, GitHub, or Facebook

API Endpoint

https://api.nyne.ai/person/newsfeed

What This API Does

Provide any social media profile URL and get back that person's recent posts, updates, and activity. See what they've been sharing, what topics they're discussing, and how their audience is engaging.

Getting Started

Just provide a social media profile URL (like someone's LinkedIn or Twitter profile) and receive their recent posts with engagement metrics like likes, comments, and shares.

Quick Example

curl -X POST "https://api.nyne.ai/person/newsfeed" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "social_media_url": "https://linkedin.com/in/username", "callback_url": "https://yourapp.com/webhook" }'

Authentication

All API requests require authentication using your API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can obtain your API key from your account dashboard.

Rate Limits

API usage is controlled by rate limiting mechanisms to ensure fair usage and system stability:

  • Per Minute: 60 requests
  • Per Hour: 1000 requests
  • Monthly: Varies by plan

Credit Usage

API credits are consumed for each newsfeed request:

  • Newsfeed Request: 6 credits per successful request

Credit Efficiency

Credits are charged when the request is successfully processed, regardless of the amount of data returned.

POST /person/newsfeed

Fetch newsfeed data from a social media profile.

POST /person/newsfeed

Parameters

social_media_url (string, required)
Social media profile URL to fetch newsfeed from
Example: https://linkedin.com/in/username
callback_url (string, optional)
URL to receive results asynchronously
Example: https://yourapp.com/webhook/newsfeed

Supported Platforms

  • LinkedIn: Professional posts, articles, and activity
  • Twitter/X: Tweets and retweets
  • Instagram: Posts and stories (public profiles only)
  • GitHub: Repository activity and commits
  • Facebook: Public posts and activity

Example Request

{ "social_media_url": "https://linkedin.com/in/johndoe", "callback_url": "https://yourapp.com/webhook/newsfeed" }

Example Response (Callback)

{ "success": true, "data": { "request_id": "newsfeed_d5b4252d9c909936_1759543380_9975", "status": "pending", "message": "Newsfeed request has been queued for processing. Results will be sent to your callback URL." }, "timestamp": "2024-01-15T10:30:00Z" }

Example Response (Immediate)

{ "success": true, "data": { "request_id": "newsfeed_d5b4252d9c909936_1759543380_9975", "status": "processing", "message": "Newsfeed request is being processed. Use the request_id to check status." }, "timestamp": "2024-01-15T10:30:00Z" }

GET /person/newsfeed

Check the status of a newsfeed request and retrieve results.

GET /person/newsfeed

Parameters

request_id (string, required)
The request ID returned from the POST request
Example: abc123def456

Example Request

GET /person/newsfeed?request_id=abc123def456

Example Response

{ "success": true, "data": { "request_id": "newsfeed_d5b4252d9c909936_1759543380_9975", "status": "completed", "completed": true, "result": { "newsfeed": [ { "id": "post_123", "content": "Excited to announce our new product launch!", "timestamp": "2024-01-14T15:30:00Z", "likes": 45, "comments": 12, "shares": 8, "post_type": "text" } ], "source": "linkedin", "username": "johndoe", "url": "https://linkedin.com/in/johndoe" }, "error": null, "created_on": "2024-01-15T10:30:00Z", "completed_on": "2024-01-15T10:35:00Z" }, "timestamp": "2024-01-15T10:35:00Z" }

Usage Statistics

Usage statistics are now available through the unified usage API at /usage. This endpoint provides comprehensive usage information including credits used, monthly allocation, and breakdown by API type.

Unified Usage API

For detailed usage statistics, please use:

GET /usage

This endpoint shows all your API usage in one place, including newsfeed requests with proper credit counting.

Response Format

All API responses follow a consistent JSON format:

Success Response

{ "status": "success", "data": { "request_id": "abc123def456", "status": "completed", "newsfeed": { "platform": "linkedin", "profile_url": "https://linkedin.com/in/johndoe", "posts": [...], "total_posts": 5 } }, "timestamp": "2024-01-15T10:30:00Z" }

Error Response

{ "status": "error", "error": { "code": "invalid_url", "message": "Invalid social media URL. Could not extract site and username from the provided URL." }, "timestamp": "2024-01-15T10:30:00Z" }

Error Codes

Code HTTP Status Description
missing_credentials 401 API key is missing from request
invalid_credentials 401 API key is invalid or expired
ip_not_allowed 403 Your IP address is not allowed
subscription_required 403 Your subscription does not include newsfeed access
missing_parameters 400 Required parameters are missing
invalid_url 400 Invalid or unsupported social media URL
invalid_callback_url 400 Invalid callback URL format
rate_limit_exceeded 429 Rate limit exceeded
monthly_limit_exceeded 429 Monthly request limit exceeded
missing_request_id 400 Request ID is required for status checks
request_not_found 404 Request ID not found
internal_error 500 Internal server error

Callbacks

For asynchronous processing, provide a callback_url in your request. We'll send a POST request to your URL when processing is complete.

Callback Request Format

POST https://yourapp.com/webhook/newsfeed Content-Type: application/json { "request_id": "abc123def456", "status": "completed", "newsfeed": { "platform": "linkedin", "profile_url": "https://linkedin.com/in/johndoe", "posts": [...], "total_posts": 5 }, "timestamp": "2024-01-15T10:30:00Z" }

Callback Requirements

  • Your endpoint must respond with HTTP 200 OK
  • Response time should be under 30 seconds
  • We'll retry failed callbacks up to 5 times with exponential backoff
  • Include proper error handling in your endpoint

Important Notes

Use Enrichment API for Complete Data

This newsfeed API provides only social media posts and activity. For comprehensive person data including contact information, company details, and newsfeed combined, use the Person Enrichment API instead.

Credit Usage

Each newsfeed request consumes 6 credits, regardless of the amount of data returned. Credits are charged when the request is successfully processed.