You need to log in to access your API credentials and start using our APIs. Start with our free trial!
Log In & Start Free TrialPerson Interactions API
Fetch social interaction data including tweet replies, followers, and following lists from Twitter/X and Instagram profiles
API Endpoint
https://api.nyne.ai/person/interactions
Try the API Playground
Test the API with our interactive playground to make real requests and see live responses.
Launch Interactions PlaygroundOverview
The Person Interactions API allows you to fetch social interaction data from Twitter/X and Instagram profiles. This includes people who replied to specific tweets, account followers, and accounts a user follows.
Key Features
- Tweet Replies: Get users who replied to a specific tweet (Twitter/X)
- Followers: Retrieve a list of people following an account (Twitter/X)
- Following: Retrieve accounts that a user follows (Twitter/X and Instagram)
- Multi-Platform: Support for Twitter/X and Instagram
- URL Parsing: Automatic extraction of usernames from Twitter/X and Instagram URLs
- Async Processing: Callback support for high-volume operations
- Rate Limiting: Built-in throttling and usage controls
Platform Support
| Interaction Type | Twitter/X | |
|---|---|---|
| Replies | Yes | No |
| Followers | Yes | No |
| Following | Yes | Yes |
Authentication
All API requests require authentication using your API key and secret. You can authenticate using either HTTP headers (recommended) or query parameters.
X-API-Key: your_api_key_hereX-API-Secret: your_api_secret_here
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 based on the interaction request:
- Interaction Request: 3 credits per successful interaction lookup
Credit Efficiency
Credits are only charged when interaction data is successfully retrieved. If no data is found, no credits are charged.
POST /person/interactions
Submit a request to fetch social interaction data.
POST /person/interactions
Parameters
Type of interaction to fetch
Values: "replies", "followers", "following", "followers,following"
Note: Instagram only supports "following" type
Twitter/X or Instagram profile or post URL.
Examples:
- https://twitter.com/elonmusk
- https://x.com/elonmusk/status/1234567890
- https://instagram.com/instagram
Maximum number of results to return
Default: 100, Max: 1000
URL to receive results asynchronously
Example: https://yourapp.com/webhook/interactions
Request Example (Replies)
Request Example (Twitter Followers)
Request Example (Instagram Following)
Response Codes
202 Request accepted for processing
400 Invalid request parameters
401 Invalid API credentials
429 Rate limit exceeded
Response Example
GET /person/interactions
Check the status of an interaction request and retrieve results.
GET /person/interactions?request_id=
Parameters
The request ID returned from the POST request
Example: interaction_abc123def456_1234567890
Request Example
Response Codes
200 Status retrieved successfully
400 Invalid request parameters
401 Invalid API credentials
404 Request ID not found
Response Example (Completed)
Interaction Type: Replies
Fetch users who replied to a specific tweet.
Example Request
Response Fields
- username: Twitter handle of the replier
- display_name: Display name
- reply_text: Content of the reply
- reply_date: When the reply was posted
- likes_count: Number of likes on the reply
- retweets_count: Number of retweets
Interaction Type: Followers
Fetch users who follow a specific account.
Example Request
Response Fields
- username: Twitter handle of the follower
- display_name: Display name
- bio: User biography
- followers_count: Their follower count
- following_count: How many they follow
- verified: Verification status
Interaction Type: Following
Fetch accounts that a specific user follows.
Example Request
Combined Request
You can fetch both followers and following in a single request:
Usage Statistics
Usage statistics are 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:
This endpoint shows all your API usage in one place, including interaction requests with proper credit counting.
Response Format
All API responses follow a consistent JSON format:
Success Response
Error Response
Error Codes
The API returns structured error responses with specific error codes to help you handle issues programmatically.
Authentication Errors (401)
| Error Code | Description |
|---|---|
missing_credentials |
API key or secret not provided in request headers |
invalid_credentials |
API key or secret is incorrect or does not match |
api_key_expired |
API key has expired and needs to be renewed |
Validation Errors (400)
| Error Code | Description |
|---|---|
missing_parameters |
Required parameters are missing (type, social_media_url, or request_id) |
invalid_interaction_type |
Unsupported interaction type. Valid types: replies, followers, following, followers,following (Instagram only supports "following") |
invalid_url |
social_media_url is not a valid URL or is from an unsupported platform. Supported: Twitter/X, Instagram |
invalid_callback_url |
callback_url is not a valid HTTP/HTTPS URL |
invalid_json |
Request body contains invalid JSON |
Authorization Errors (403)
| Error Code | Description |
|---|---|
subscription_required |
Your subscription does not include access to this feature |
insufficient_credits |
Not enough credits remaining to process this request |
no_active_subscription |
No active subscription found for this API key |
ip_not_allowed |
Request IP address is not in the allowed list |
access_denied |
Access denied to this resource |
Not Found Errors (404)
| Error Code | Description |
|---|---|
request_not_found |
Request ID not found (for GET status checks) |
Rate Limit Errors (429)
| Error Code | Description |
|---|---|
rate_limit_exceeded |
Too many requests per minute/hour. Please slow down. |
monthly_limit_exceeded |
Monthly request limit exceeded. Resets at start of billing cycle. |
Server Errors (500)
| Error Code | Description |
|---|---|
internal_error |
An unexpected server error occurred. Please try again later. |
Error Response Example
Callback System
When you provide a callback_url, the API will send the interaction results to your endpoint via HTTP POST when processing is complete.
Callback Request Format
Callback Retry Policy
- Maximum 5 retry attempts
- Exponential backoff: 1s, 5s, 15s, 1m, 5m
- 30-second timeout per request
- Your endpoint should return HTTP 2xx for success
Callback Error Format
Important: Your callback endpoint should respond with HTTP 200-299 to indicate successful receipt. Any other response code will trigger a retry.