Instagram Scraper avatar

Instagram Scraper

Try for free

Pay $2.30 for 1,000 results

Go to Store
Instagram Scraper

Instagram Scraper

apify/instagram-scraper
Try for free

Pay $2.30 for 1,000 results

Scrape and download Instagram posts, profiles, places, hashtags, photos, and comments. Get data from Instagram using one or more Instagram URLs or search queries. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.

Do you want to learn more about this Actor?

Get a demo
RH

get post by post url

Closed

rhysryan opened this issue
23 days ago

I want to scrape just the post by post url. When I try that with this post, I get all the comments from the post. I wish there was a way to searchType to post and just get back the single post specified by the directURLs value.

alexey avatar

Hi!

Just make sure that you choose to scrape "details" and then you will get post details per URL, see sample run https://console.apify.com/view/runs/IbAgwnKm9ggFstVIE

It includes a comments preview because the actor gets all the public details available, however, you can omit unwanted values like this: https://api.apify.com/v2/datasets/p6gf0isbZ5OK5DIgT/items?clean=true&format=json&omit=latestComments

I´m going to close the issue now, but if there is anything else we could help with, please let us know.

RO

rhysryan-owner

22 days ago

Thank you SO much for this.

Quick question, I am using Python and I want to omit the comments. However, there doesn't seem to be a JSON field to do that, only on the command line.  Any thoughts on how I can omit comments via JSON?

Thanks again.

Happy Christmas.

Rhys Ryan CEO & Co-Founder m: 310-927-2596  | ekkobar.ai http://www.ekkobar.ai

RO

rhysryan-owner

21 days ago

Good morning,

Thank you for this.  I tried multiple ways to omit comments and nothing seemed to work.

Here's my JSON:

run_input = { "directUrls": [post_url], "resultsType":"details", "omit":"latestComments", "addParentData":False, "resultsLimit":1, "enhanceUserSearchWithFacebookPage":False, "isUserReelFeedURL":False, "isUserTaggedFeedURL":False }

I also tried:

"omit": ["latestComments"],

What am I doing wrong?

Thanks and Merry Christmas.

Rhys Ryan CEO & Co-Founder m: 310-927-2596  | ekkobar.ai http://www.ekkobar.ai

alexey avatar

Hi!

Getting the dataset is not related to input in any way. You should provide dataset parameters as described in https://docs.apify.com/sdk/python/reference/class/Dataset#get_data or https://docs.apify.com/api/client/python/reference/class/DatasetClient#list_items

You can also ask community in Apify Discord #hire-freelancers to build a simple integration script for this.

Developer
Maintained by Apify

Actor Metrics

  • 5.9k monthly users

  • 737 stars

  • >99% runs succeeded

  • 2.5 days response time

  • Created in Apr 2019

  • Modified a day ago