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
CV

Problem on onlyPostsNewerThan

Open

customary_viburnum opened this issue
4 months ago

Hi there. Im running through API but "onlyPostsNewerThan" is not triggering ok. Please check it and confirm me if this is the parameter name or not. I've just run and returned 740 tasks when should only trigger from yesterday.

{ "data": { "id": "GsPPR0lYI5tIHXa0f", "actId": "shu8hvrXbJbY3Eb9W", "userId": "NNNNNNNNN", "actorTaskId": "h8Bh01IUfvjAL2anh", "onlyPostsNewerThan": "{{5.result}}", "finishedAt": null, "skipPinnedPosts": true, "status": "READY", "meta": { "origin": "API", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, como Gecko) Chrome/126.0.0.0 Safari/537.36" }, "stats": { "inputBodyLen": 2030, "rebootCount": 0, "restartCount": 0, "resurrectCount": 0, "computeUnits": 0 }, "options": { "build": "latest", "timeoutSecs": 604800, "memoryMbytes": 4096, "diskMbytes": 8192 }, "createdByOrganizationMemberUserId": "EL3pqsau7NibbydbD", "buildId": "detz7JNWe2S8Yfy3s", "defaultKeyValueStoreId": "gKigiFNVfVyNVhCB3", "defaultDatasetId": "0LxgO783MVBHtAbPQ", "defaultRequestQueueId": "tSOIGOVcKljFnsNzo", "buildNumber": "0.0.256", "containerUrl": "https://n9mfcl7lnrkr.runs.apify.net", "usage": { "ACTOR_COMPUTE_UNITS": 0, "DATASET_READS": 0, "DATASET_WRITES": 0, "KEY_VALUE_STORE_READS": 0, "KEY_VALUE_STORE_WRITES": 1, "REQUEST_QUEUE_READS": 0, ... [trimmed]

jakubkonecny avatar

Hello, thank you for your feedback. The parameter name is indeed correct. We will investigate the issue futher and get back to you as soon as possible.

CV

customary_viburnum

4 months ago

Any feedback?

jakubkonecny avatar

Hello, it seems like the issue is in the "location" of your onlyPostsNewerThan. In the input you provided, it is inside a data object.

When you put it outside of it (so top level of the input), and edit it so instead of { "onlyPostsNewerThan": "2024-08-12T00:00:00Z" }, it would become { "onlyPostsNewerThan": "2024-08-12" } (because the actor now supports date strings in this format), it works as expected.

It that a viable solution for you? :)

L7

Lingbot_7

3 months ago

I just tested it with an Instagram page where I pinned 3 items at the top. It returned data from the last day, including the pinned items (which were a year old). So, it works fine for today's content but doesn't work well when pinned items are at the top.

here s my input:

{ "addParentData": false, "directUrls": [ "https://www.instagram.com/eukbc" ], "enhanceUserSearchWithFacebookPage": false, "isUserReelFeedURL": false, "isUserTaggedFeedURL": false, "onlyPostsNewerThan": "2024-09-23" }

Note: JFI I am using instagram scrapper.

jakubkonecny avatar

Hello, the actor always adds the pinned items by default, no matter the "onlyPostsNewerThan" value. We are discussing if this is something we want to change or keep as is.

alexey avatar

Follow up:

Please use josn input value skipPinnedPosts: true as in sample run https://console.apify.com/view/runs/gKpji0rxGUixt7u3c

Manual checkup: https://api.apify.com/v2/datasets/dH8ZyB9mXsWmQ7CL9/items?clean=true&fields=url,timestamp&format=json - 2 posts by date as expected (with pinned posts skipped)

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

UK

user-KrfPkkzfBduqFmnJT

2 months ago

hello, I want to ask if there is a possibility to filter results also by hour:minute:secons at onlyPostsNewerThan value? for example: "onlyPostsNewerThan": "2024-10-10 14:32:07"

my goal is to get only totally fresh posts, after providen hour, I want to avoid returning the same posts posted earlier in the day

I was trying this approach: https://console.apify.com/actors/shu8hvrXbJbY3Eb9W/issues/vnnjQeZ7gOedWgOsZ there is my run: https://console.apify.com/view/runs/kqgnfCIatdOMAp3R8

but it still returns older posts

Developer
Maintained by Apify

Actor Metrics

  • 6k monthly users

  • 588 stars

  • >99% runs succeeded

  • 2.5 days response time

  • Created in Apr 2019

  • Modified an hour ago