Instagram Post Scraper avatar

Instagram Post Scraper

Try for free

Pay $2.30 for 1,000 results

View all Actors
Instagram Post Scraper

Instagram Post Scraper

apify/instagram-post-scraper
Try for free

Pay $2.30 for 1,000 results

Scrape Instagram posts. Just add one or more Instagram usernames and get your data in seconds including text, hashtags, mentions, comments, images, URLs, likes, locations, and metadata. 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
LF

API not working

Open

llyc_fabrica opened this issue
a month ago

The api does not work, we can only execute task through the web platform

jakubkonecny avatar

Hello, thank you for your feedback. Can you please specify what happens when you try to run the API on your side, so we can investigate the issue futher? Any error codes or messages? Thank you :)

alexey avatar

Hi!

Follow up: API is platform feature and works in the same way for all actors. Please click "API" button in actor console https://console.apify.com/actors/nH2AHrwxeTRJoN5hX/ then "API endpoints" - you will see brief description and generated URLs with the token and "Test endpoint" option.

For further reference please check https://docs.apify.com/api/v2#tag/ActorsRun-actor-synchronously

There was not runs initiated by API under your account, so something is wrong about the way how you call API endpoint - token is missing or input is not correctly specified, or something else. We can not track issue at our side since wrong API call returned to the caller with error but not saved in actor history under caller account (assuming that you will check the error and take actions accordingly)

alexey avatar

Follow up about python https://console.apify.com/actors/KoJrdxJCTtpon81KY/issues/fIiKIuczjoQVtTOXg case

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = {
8    "startUrls": [{ "url": "https://www.facebook.com/humansofnewyork/" }],
9    "resultsLimit": 20,
10}
11
12# Run the Actor and wait for it to finish
13run = client.actor("KoJrdxJCTtpon81KY").call(run_input=run_input)
14
15# Fetch and print Actor results from the run's dataset (if there are any)
16for item in client.dataset(run["defaultDatasetId"]).iterate_items():
17    print(item)
Developer
Maintained by Apify
Actor metrics
  • 1.5k monthly users
  • 96 stars
  • 100.0% runs succeeded
  • 1.1 days response time
  • Created in Nov 2021
  • Modified 4 days ago