Skip to main content
POST
/
v1
/
posts
/
analyze
import InflushipAPI from 'influship';

const client = new InflushipAPI({
apiKey: 'My API Key',
});

const postAnalysis = await client.posts.analyze({ url: 'https://example.com' });

console.log(postAnalysis.id);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "instagram",
"platform_post_id": "3234567890123456789",
"is_video": false,
"media_url": "https://cdn.influship.com/posts/img_123.jpg",
"posted_at": "2024-01-15T08:30:00.000Z",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"platform": "instagram"
},
"shortcode": "CxABc1234De",
"caption": "Morning workout complete! 💪 Ready to take on the day. #fitness #wellness",
"accessibility_caption": "Person doing yoga pose on beach at sunrise",
"media_urls": [
"https://cdn.influship.com/posts/img_123.jpg"
],
"thumbnail_url": "https://cdn.influship.com/posts/thumb_123.jpg",
"scraped_at": "2024-01-15T10:00:00.000Z",
"likes_count": 5420,
"comments_count": 143,
"video_view_count": 28500,
"video_duration_seconds": 45.5,
"ai_analysis": {
"summary": "Post showcases a morning workout routine featuring yoga and strength training. Promotes healthy lifestyle and wellness practices with motivational messaging.",
"transcript": "Good morning everyone! Today we're doing a 20-minute full body workout..."
},
"brand_safety": {
"ok": true,
"rating": "A",
"overall_confidence": 0.92,
"summary": "Content is family-friendly and aligns with positive brand values",
"flags": [],
"reasoning": "Analysis of 20 recent posts shows consistent positive messaging focused on health and wellness with no controversial content",
"metadata": {
"model_version": "<string>",
"analysis_date": "2023-11-07T05:31:56Z",
"processing_time_ms": 123,
"content_analyzed": {
"text_length": 123,
"posts_count": 123
}
}
}
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
  • Option 1
  • Option 2

Request payload for analyzing a single social media post

url
string<uri>
required

Public URL of the post to analyze Public URL of the post to analyze

post_id
string

Platform-specific post ID

platform
enum<string>

Social media platform (required when using post_id)

Available options:
instagram,
tiktok
features
enum<string>[]

Analysis features to include

Available options:
ai_analysis,
brand_safety

Response

Post analysis results

Analysis result for a single social media post

id
string<uuid>
required

Internal post ID

platform
enum<string>
required

Social media platform

Available options:
instagram,
tiktok
platform_post_id
string
required

Platform-specific unique identifier for this post. Format varies by platform (Instagram: numeric ID, TikTok: alphanumeric).

Example:

"3234567890123456789"

is_video
boolean
required

Whether this post contains video content. true for video posts and reels, false for photo posts.

Example:

false

media_url
string<uri>
required

URL of the primary media file (image or video). For carousel posts, this is the first item.

Example:

"https://cdn.influship.com/posts/img_123.jpg"

posted_at
string<date-time>
required

ISO 8601 timestamp when the post was originally published.

Example:

"2024-01-15T08:30:00.000Z"

creator
object
required

Creator information for a post

shortcode
string | null

Instagram shortcode used in post URLs (instagram.com/p/{shortcode}). Only present for Instagram posts, null for other platforms.

Example:

"CxABc1234De"

caption
string | null

Post caption text written by the creator. null if no caption was provided.

Example:

"Morning workout complete! 💪 Ready to take on the day. #fitness #wellness"

accessibility_caption
string | null

Alt text or accessibility caption describing the media. Useful for understanding image content. null if unavailable.

Example:

"Person doing yoga pose on beach at sunrise"

media_urls
string<uri>[]

Array of all media URLs in this post. Contains multiple items for carousel posts, single item for regular posts.

Example:
[
"https://cdn.influship.com/posts/img_123.jpg"
]
thumbnail_url
string<uri> | null

Thumbnail image URL for video posts. Only present when is_video is true, null for photo posts.

Example:

"https://cdn.influship.com/posts/thumb_123.jpg"

scraped_at
string<date-time>

ISO 8601 timestamp when we last scraped/updated this post's data. Metrics are accurate as of this time.

Example:

"2024-01-15T10:00:00.000Z"

likes_count
integer | null

Total likes on post. null if platform hides like counts or data unavailable.

Required range: x >= 0
Example:

5420

comments_count
integer | null

Total comments on post. null if unavailable.

Required range: x >= 0
Example:

143

video_view_count
integer | null

Video view count. null for photo posts or if unavailable.

Required range: x >= 0
Example:

28500

video_duration_seconds
number | null

Video length in seconds. null for photo posts.

Required range: x >= 0
Example:

45.5

ai_analysis
object

AI-powered content analysis. Only present when ai_analysis feature is requested.

brand_safety
object

Brand safety analysis results