# Third Party API

Get Public data and insights (with or without Audience demographics) of a creator using their Instagram, YouTube or TikTok handle.

## POST  - Add Creator handles

This API is used for adding creators to the dashboard.

```
curl --location 'https://app.ylytic.com/ylytic/admin/api/v1/creators' \
--header 'Authorization: Bearer {{auth_header}}' \
--data-raw '{
    "handles": ["https://www.instagram.com/minimuffin8888/",
                 "https://www.youtube.com/@beerbiceps", 
                 "https://www.tiktok.com/@selenagomez"]
}'
```

### payload

<table><thead><tr><th width="235">ATTRIBUTES</th><th>DESCRIPTION</th><th>SAMPLE DATA</th></tr></thead><tbody><tr><td><strong>handles</strong></td><td>The handle of the creator which will be added to the dashboard.</td><td>["https://www.instagram.com/minimuffin8888/"]</td></tr></tbody></table>

<details>

<summary>Output (JSON)</summary>

```
{
  "status": "success"
}
```

</details>



## PUT -   Initiate Audience Demographics

This API is used for initiating the audience demographics.

```
curl --location --request PUT 'https://app.ylytic.com/ylytic/admin/api/v1/creators' \
--header 'Authorization: Bearer {{auth_header}}' \
--data '{
    "handle": "minimuffin8888",
    "connector": "instagram"
}'
```

### payload

<table><thead><tr><th width="266">ATTRIBUTES</th><th>DESCRIPTION</th><th>SAMPLE DATA</th></tr></thead><tbody><tr><td><strong>handle</strong></td><td>The handle of the creator which will be added to the dashboard.</td><td>"minimuffin8888"</td></tr><tr><td><strong>connector</strong></td><td>Platform name on which the creator posts the content.</td><td>"instagram"</td></tr></tbody></table>

<details>

<summary>Output (JSON)</summary>

```json
{
  "status": "success"
}
```

</details>



## GET  - Get Instagram Creator Insights

Get insights from creator's Instagram handle.

```
curl --location 'https://app.ylytic.com/ylytic/api/v1/insights/public/instagram/overall?identifier=minimuffin8888' \
--header 'Authorization: Bearer {{auth_header}}'
```

<details>

<summary>Output (JSON)</summary>

```
{
  "get_audience": {
    "age_gender_distribution": {
      "13-17": {
        "female": 2.7,
        "male": 2.7
      },
      "18-24": {
        "female": 20.5,
        "male": 1.4
      },
      "25-34": {
        "female": 30.2,
        "male": 11
      },
      "35-44": {
        "female": 6.8,
        "male": 11
      },
      "45-54": {
        "female": 4.1,
        "male": 4.1
      },
      "55-64": {
        "female": 0,
        "male": 4.1
      },
      "65-": {
        "female": 0,
        "male": 1.4
      }
    },
    "age_group_distribution": {
      "13-17": 5.7,
      "18-24": 22.9,
      "25-34": 42.8,
      "35-44": 18.6,
      "45-54": 8.6,
      "55-64": 0,
      "65-": 1.4
    },
    "authenticity_distribution": {
      "fake": 5.1,
      "influencers": 1,
      "mass_followers": 15.2,
      "real": 78.7
    },
    "city_distribution": {
      "Bangalore": 5.71,
      "Chennai": 8.57,
      "Delhi": 48.57,
      "Mumbai": 11.43,
      "Others": 11.43,
      "Pune": 14.29
    },
    "comments": [],
    "comments_sentiment_analysis": {
      "negatives": 0,
      "neutral": 0,
      "positives": 0
    },
    "comments_wordmap": [],
    "gender_distribution": {
      "female": 64,
      "male": 36
    },
    "handle": "minimuffin8888",
    "ig_user_id": "52171953972",
    "interests": {
      "Beauty & Hygiene": 27.03,
      "Fashion": 18.92,
      "Food & Beverages": 21.62,
      "Health & Fitness": 18.92,
      "Home & Lifestyle": 21.62,
      "Music & Dance": 13.51,
      "Parenting": 59.46,
      "Photography": 13.51,
      "Sports": 18.92,
      "Travel & Adventure": 29.73
    },
    "last_processed_at": "10/07/2023",
    "notable_followers": [
      "divansh_world",
      "familywellhealth"
    ]
  },
  "get_growth_trends": {
    "cumulative_followers_trends": [
      {
        "2023-03-31": {
          "followers": 253
        }
      },
      {
        "2023-03-31": {
          "followers": 253
        }
      },
      {
        "2023-03-31": {
          "followers": 253
        }
      },
      {
        "2023-03-31": {
          "followers": 253
        }
      },
      {
        "2023-05-18": {
          "followers": 251
        }
      },
      {
        "2023-05-18": {
          "followers": 251
        }
      },
      {
        "2023-05-18": {
          "followers": 251
        }
      },
      {
        "2023-05-18": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-05-19": {
          "followers": 251
        }
      },
      {
        "2023-06-02": {
          "followers": 250
        }
      },
      {
        "2023-06-15": {
          "followers": 251
        }
      },
      {
        "2023-06-21": {
          "followers": 251
        }
      },
      {
        "2023-06-27": {
          "followers": 251
        }
      }
    ],
    "engagement_trends": [
      {
        "2023-03-31": {
          "engagement": 145.82
        }
      },
      {
        "2023-03-31": {
          "engagement": 145.82
        }
      },
      {
        "2023-03-31": {
          "engagement": 145.82
        }
      },
      {
        "2023-03-31": {
          "engagement": 145.82
        }
      },
      {
        "2023-05-18": {
          "engagement": 262.62
        }
      },
      {
        "2023-05-18": {
          "engagement": 262.58
        }
      },
      {
        "2023-05-18": {
          "engagement": 262.52
        }
      },
      {
        "2023-05-18": {
          "engagement": 262.45
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.68
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.48
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.41
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.38
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.21
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.05
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.05
        }
      },
      {
        "2023-05-19": {
          "engagement": 263.01
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.82
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.75
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.75
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.72
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.72
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.68
        }
      },
      {
        "2023-05-19": {
          "engagement": 262.65
        }
      },
      {
        "2023-06-02": {
          "engagement": 284.77
        }
      },
      {
        "2023-06-15": {
          "engagement": 301.66
        }
      },
      {
        "2023-06-21": {
          "engagement": 307.01
        }
      },
      {
        "2023-06-27": {
          "engagement": 313.11
        }
      }
    ],
    "handle": "minimuffin8888",
    "ig_user_id": "52171953972",
    "last_processed_at": "10/07/2023",
    "monthly_engagement": 11.45,
    "monthly_followers": 0,
    "quaterly_engagement": 50.46,
    "quaterly_followers": 0,
    "yearly_engagement": 0,
    "yearly_followers": 0
  },
  "get_posts": {
    "ig_user_id": "52171953972",
    "last_processed_at": "Mon, 10 Jul 2023 15:37:51 GMT",
    "non_video_posts": [],
    "video_posts": [
      {
        "comments_count": 2,
        "er": 41.43,
        "hashtags": [
          "#equalparenting",
          "#toddlerparenting"
        ],
        "image_url": "https://s3.ap-south-1.amazonaws.com/nudges//tmp/CtG5LE9KVXq.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWWFIDMVS2OYM2OOM%2F20230710%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T153751Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=f5b77327e5c34c2c4e5dac4bb1a8507ed9534682343f48061f12cf7e7d8694e4",
        "likes_count": 102,
        "post_url": "https://www.instagram.com/p/CtG5LE9KVXq",
        "posted_date": "2023-06-05",
        "shortcode": "CtG5LE9KVXq",
        "sponsored": false,
        "title": "Give each other a chance to shine…\nGo for Equal Parenting !!\nVideo credit @vangel_bhawna \n.\n.\n.\n#equalparenting #toddlerparenting",
        "views": 1662
      },
      {
        "comments_count": 5,
        "er": 22.31,
        "hashtags": [
          "#geniustoddler",
          "#lovetoddlers",
          "#toddlerparenting",
          "#babybraindevelopment"
        ],
        "image_url": "https://s3.ap-south-1.amazonaws.com/nudges//tmp/CrIxhB6K7ew.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWWFIDMVS2OYM2OOM%2F20230710%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T153751Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=6e87617580dd6cf5856e15e64597b27273fe6f879d2686df97f83c3c5e6ee98f",
        "likes_count": 51,
        "post_url": "https://www.instagram.com/p/CrIxhB6K7ew",
        "posted_date": "2023-04-17",
        "shortcode": "CrIxhB6K7ew",
        "sponsored": false,
        "title": "Have you ever tried following your kid and see where or what they lead to?\nPC @pragya5050 \n.\n.\n.\n#geniustoddler #lovetoddlers #toddlerparenting #babybraindevelopment",
        "views": 410
      },
      {
        "comments_count": 4,
        "er": 17.53,
        "hashtags": [
          "#toddlerlove",
          "#parentstotoddlers"
        ],
        "image_url": "https://s3.ap-south-1.amazonaws.com/nudges//tmp/Cq76xRqqP4G.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWWFIDMVS2OYM2OOM%2F20230710%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T153751Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=8511c04d4688f5e1dd3d22e73c29a63276852b8b456b04cf03cadad621df3bef",
        "likes_count": 40,
        "post_url": "https://www.instagram.com/p/Cq76xRqqP4G",
        "posted_date": "2023-04-12",
        "shortcode": "Cq76xRqqP4G",
        "sponsored": false,
        "title": "Isn’t it funny about toddlers?\nThey are the reason we lose it every time and they are reason we hold it all together 😍\n.\n.\n.\n#toddlerlove #parentstotoddlers",
        "views": 451
      },
      {
        "comments_count": 2,
        "er": 10.36,
        "hashtags": [
          "#newmommy",
          "#momlifebelike",
          "#metime"
        ],
        "image_url": "https://s3.ap-south-1.amazonaws.com/nudges//tmp/Cq5c-V5B10h.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWWFIDMVS2OYM2OOM%2F20230710%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T153751Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=d60c1217d706289f0a25e2d63fe100b1bd29b35e392455bb0e2a6f5e7f32433b",
        "likes_count": 24,
        "post_url": "https://www.instagram.com/p/Cq5c-V5B10h",
        "posted_date": "2023-04-11",
        "shortcode": "Cq5c-V5B10h",
        "sponsored": false,
        "title": "ME TIME is a must for everyone!!\nVC @jayagupta_31 \nShower of flowers @snehal.kargaonkar.1 \n.\n. \n.\n#newmommy #momlifebelike #metime",
        "views": 469
      },
      {
        "comments_count": 4,
        "er": 23.11,
        "hashtags": [
          "#momdaughtergoals"
        ],
        "image_url": "https://s3.ap-south-1.amazonaws.com/nudges//tmp/Cq0LMsfKRwi.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWWFIDMVS2OYM2OOM%2F20230710%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T153751Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=cd1cadb63d369a5c57f7ec3a6f8d84d46d7bc70851acca0348425046c31e4e3d",
        "likes_count": 54,
        "post_url": "https://www.instagram.com/p/Cq0LMsfKRwi",
        "posted_date": "2023-04-09",
        "shortcode": "Cq0LMsfKRwi",
        "sponsored": false,
        "title": "Gotta have fun !!\nPC @anurag.itbhu05 \n.\n.\n.\n#momdaughtergoals",
        "views": 491
      }
    ]
  },
  "get_reach_and_engagement_details": {
    "average_comments": 4,
    "average_likes": 782,
    "average_unique_viewers": 3561,
    "average_views": 3957,
    "effective_follower_rate": 471.71,
    "estimated_story_reach": 9,
    "estimted_story_views": 10,
    "handle": "minimuffin8888",
    "ig_user_id": "52171953972",
    "last_processed_at": "10/07/2023",
    "median_comments": 5,
    "median_likes": 109,
    "median_unique_viewers": 1065,
    "median_views": 1184,
    "non_video_average_comments": 0,
    "non_video_average_likes": 0,
    "non_video_average_views": 0,
    "non_video_engagement": 0,
    "non_video_reach": 0,
    "overall_engagement": 313.41,
    "paid_post_average_comments": 0,
    "paid_post_average_likes": 0,
    "paid_post_average_views": 0,
    "paid_post_engagement": 0,
    "popular_post_type": "REELS",
    "video_average_comments": 4,
    "video_average_likes": 782,
    "video_engagement": 313.41
  },
  "profile_details": {
    "age_group": "unknown",
    "biography": "Enhance your baby’s brain development and boost motor skills. For infants 0-12 months, weekly crucial yet easy activities 🥰",
    "brand_mentions": [],
    "brand_mentions_details": [],
    "category": "Parenting",
    "email": null,
    "external_link": "https://bit.ly/3zHcjIy",
    "full_name": "Minimuffin",
    "gender": "unknown",
    "handle": "minimuffin8888",
    "handle_link": "https://instagram.com/minimuffin8888/",
    "hashtags": [
      "#geniustoddler",
      "#momfinances",
      "#shytoddler",
      "#metime",
      "#parentingissues",
      "#babydevelopmentmilestones",
      "#kidsmimicwhattheysee",
      "#equalparenting",
      "#parentingregrets",
      "#parentingatoddlerisnojoke",
      "#toddlermomlife",
      "#parentstobe👪",
      "#parentingtips",
      "#parentingatoddler",
      "#likedaughterlikefather",
      "#babybraindevelopment",
      "#toddlerperks",
      "#toddlertantrumsofinstagram",
      "#toddlerlove",
      "#momdaughtergoals",
      "#newmommy",
      "#parentstotoddlers",
      "#financialfreedom💰",
      "#momfinancialtips",
      "#newparentstobe",
      "#lovetoddlers",
      "#parentingtroubles",
      "#parentingtoddlers",
      "#parentslove",
      "#moneymanagementtips",
      "#fatherdaughtergoals",
      "#momlifebelike",
      "#newparentslife",
      "#infantparentmentalhealth",
      "#toddleractivities",
      "#childgrowth",
      "#toddlerparenting"
    ],
    "ig_category": "Digital creator",
    "ig_user_id": "52171953972",
    "image_url": "https://s3.ap-south-1.amazonaws.com/nudges//tmp/09fc4457-7e26-48ed-a08d-77111a477390.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWWFIDMVS2OYM2OOM%2F20230710%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T153749Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=a45c4884f2b2e630fbaed4ace5cbc4760dfbd6c0ea44ec75da3a089db2a5ae58",
    "interests": [
      "Finance",
      "Parenting"
    ],
    "last_processed_at": "27/06/2023",
    "location": "Pune",
    "mentions": [
      "@vangel_bhawna",
      "@jayagupta_31",
      "@pragya5050",
      "@snehal.kargaonkar.1",
      "@anurag.itbhu05"
    ],
    "mobile": null
  },
  "profile_overview": {
    "content_per_week": 0.58,
    "engagement": 313.41,
    "followers_count": 251,
    "following_count": 93,
    "handle": "minimuffin8888",
    "ig_user_id": "52171953972",
    "influencer_tier": "Early",
    "last_processed_at": "27/06/2023",
    "post_count": 81
  },
  "unrelated_data": {
    "status": "success",
    "time_taken": 1.7706446647644043
  }
}
```



</details>



## GET - Get YouTube Creator Insights

Get insights from creator's YouTube handle.

```
curl --location 'https://insights.ylytic.com/ylytic/api/v1/insights/public/youtube/overall?identifier=@beerbiceps' \
--header 'Authorization: Bearer {{auth_header}}'
```



## GET - Get TikTok Creator Insights

Get insights from creator's TikTok handle.

```
curl --location 'https://insights.ylytic.com/ylytic/api/v1/insights/public/tiktok/overall?identifier=@selenagomez' \
--header 'Authorization: Bearer {{auth_header}}'
```
