Include vetric_instagram_post_comments

Include comments found on posted user reels

The vetric_instagram_user_reels connector now has an additional feature that allows the inclusion of comments associated with each User Reel post. Users can retrieve up to a specified number of comments for each post.

Data Collection Job Example

This example demonstrates a job query that will fetch up to 10 Instagram User Reels Posts for the user with ID '52049029117'_, and then retrieve up to 5 comments for each of those posts.

📘

Note: You can specify the max_documents parameter to control the volume of data retrieved in both the main and included queries.

curl --location 'https: //api.platform.datastreamer.io/api/pipelines/{PIPELINE_ID}/components/{COMPONENT_ID}/jobs?ready=true' \
      --header 'apikey: <your-api-key>' \
      --header 'Content-Type: application/json' \
      --data \
        '{
	"job_name": "my instagram data collection",
	"data_source": "vetric_instagram_user_reels",
	"max_documents": 10,
	"query": {
		"query": "52049029117",
		"include": [
			{
				"data_source": "vetric_instagram_post_comments",
				"max_documents": 5
			}
		]
	},
	"job_type": "oneTime"
}'

Important: Replace the PIPELINE_ID and COMPONENT_ID values with those corresponding to your pipeline.

Data Collection Job Results

Once the User Reel posts have been fetched, the query will then retrieve up to 5 comments from the vetric_instagram_post_comments data source for each post. These comments are linked back to the related post by matching the post ID.

Here's an example of the response for the comments retrieved:

{
  "documents": [
    {
      "data_source": "vetric_instagram_post_comments",
      "id": "18019083575265676",
      "author": {
        "userid": "28569666463",
        "handle": "qbangrl13",
        "name": "ɐɯıəʎ",
        "profile_image_source": "https://scontent-dfw5-1.cdninstagram.com/v/t51.2885-19/460686175_1555771215366982_2989984919338633558_n.jpg?stp=dst-jpg_e0_s150x150&_nc_ht=scontent-dfw5-1.cdninstagram.com&_nc_cat=110&_nc_ohc=pMblR8AEHKQQ7kNvgH7Gvtv&edm=AId3EpQBAAAA&ccb=7-5&oh=00_AYBjMp-YqZZNWAiucGjQbOk6p5Y3SctYV8jCv4PBtn910Q&oe=66FC88F0&_nc_sid=f5838a",
        "verified": false,
        "is_mentionable": false,
        "url": "https://www.instagram.com/qbangrl13"
      },
      "doc_date": "2024-09-23T12:37:44.000Z",
      "content": {
        "published": "2024-09-23T12:37:44.000Z",
        "body": "I have four.. been keeping them since I was a teenager. I love these lil guys ❤️",
        "likes_count": 1,
        "child_comments_count": 0,
        "related_post_id": "3463427961463821516"
      },
      "instagram": {
        "content_type": "comment"
      }
    }
  ]
}

Important: Only a single include object can be requested per query.