How to scrape Instagram trending reels

Get Instagram trending reels as JSON with one request. It costs 1 credit.

Preview
The API is in early access. Ask for a key; the examples use api.socialscrape.io.

Before you start

  • An API key, sent in the x-api-key header. Keep it on your server.
  • For this endpoint you send nothing beyond your key. The Instagram trending reels page lists every parameter.

Step 1: Send the request

GET /v1/instagram/reels/trending. Pick your language; each one reads the key from SOCIALSCRAPE_API_KEY.

Step 2: Read the response

Results are in data.items. Here is what one item gives you, from a recorded sample.

Fields printed aboveSample
{
  "text": "Welp #cool",
  "id": "DfBK2blPXvQ",
  "stats": {
    "likes": 1199765
  }
}

A field the platform does not give comes back as null. The full field list is on the endpoint page.

Step 3: Get the next page

Send the same request with the cursor you got back, until has_more is false. Each page costs its own price.

Step 4: Handle errors

Check ok, then branch on error.code and error.retryable, never on the message.

CodeHTTPRetryMeaning
not_found404noThe platform says this profile, post or item does not exist.

Other errors, such as unauthorized or rate_limited, are on the errors page.

With the SDK

The Python and TypeScript clients wrap all of this: typed errors, retries, and cursor paging. They are in preview and not published yet.

What it costs

1 credit. A failed request costs nothing. Add max_age_days to reuse a cached result for 0 credits. Results are kept 1 day.

Next

Questions

How do I watch Instagram trending reels for new items?

Create a monitor on this endpoint and get new items at a webhook, instead of polling. See the monitors reference.

Which language should I use?

Any. It is plain HTTP and JSON, so every language with an HTTP client works. The tabs show the same request nine ways.

Get a key.

Early access keys go to developers and agent builders first.

Get early access