All endpoints
Instagram Posts

Instagram Posts API

Search Instagram posts by hashtag. Returns post URL, author username, publication date, and caption snippet for each result. Supports fetching multiple pages of results in a single API call.

Price: $0.006 per page
Free tier: 50 requests/month
Endpoint
GET /v1/instagram/posts

Parameters

query *
Hashtag to search (max 500 characters)
pages
Number of pages to fetch, 1-10 (default: 1)
sort_by
Sort order: most_recent or relevance (default: most_recent)

Response fields

posts
Array of matching posts
title
Post title (format: @username on Instagram)
url
Direct link to the post
date
Publication date and time
author
Instagram username
source
Platform name (Instagram)
snippet
Post caption text
pages
Number of pages fetched
count
Total results returned

Example Request

curl "https://api.apidirect.io/v1/instagram/posts?query=technology&pages=2" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "posts": [
    {
      "title": "@instagramuser on Instagram",
      "url": "https://instagram.com/p/...",
      "date": "2024-01-15 14:30:00",
      "author": "instagramuser",
      "source": "Instagram",
      "snippet": "Post caption here..."
    }
  ],
  "pages": 2,
  "count": 24
}

Frequently asked questions

How fresh is the Instagram data?

Our Instagram Posts API provides real-time data from Instagram, with results going back multiple years to a few seconds ago.

Does this include Instagram Stories or Reels?

The API primarily returns feed posts. Stories are ephemeral and not indexed. Reels may appear in results if they contain the searched hashtag.

Can I get the image or video URL?

The API returns the post URL which links to the original Instagram post. Direct media URLs are not provided, but you can access the content through the post link.

How does pricing work?

You only pay for successful requests. The Instagram Posts API costs $0.006 per page. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 3 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the Instagram Posts API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key