---
title: "Get recent posts for an Instagram hashtag"
method: GET
path: "/instagram/hashtag"
tags: ["Instagram"]
---

# Get recent posts for an Instagram hashtag

`GET /instagram/hashtag`

## Request

- Base URL: `https://api.scrapefield.com/v1`
- URL: `https://api.scrapefield.com/v1/instagram/hashtag`
- Auth: one of:
  - HTTP bearer
  - none

Fetch recent posts carrying one hashtag, each a full post. Use this for trend and campaign monitoring.

Costs 64 credits, whether the answer is fetched or served from cache. A failed call is refunded automatically.

## Query parameters

- `tag` string, required
- `limit` integer
- `cursor` string
- `fresh` boolean
- `demo` boolean

## Response `200`

The request succeeded.

- object
  - `data` InstagramPost[], required
    - `id` string, required: Instagram's numeric id for the post.
    - `shortcode` string, required: The code in the URL, e.g. `C1a2B3c4D5e`.
    - `permalink` string, uri, required: The post.
    - `media_type` 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM', required: As the Graph API names them.
    - `media_product_type` 'FEED' | 'REELS', required: A grid post or a Reel.
    - `caption` string, nullable, required: The caption.
    - `timestamp` string, date-time, nullable, required: When it was posted. `null` when the source does not say.
    - `username` string, required: Who posted it.
    - `media_url` string, uri, required: The image, or the video file. A carousel's first item. On Instagram's CDN. Instagram signs the link, and it stops working within a few days, so fetch the file soon. We do not rehost media.
    - `thumbnail_url` string, uri, nullable, required: The cover of a video. On Instagram's CDN. Instagram signs the link, and it stops working within a few days, so fetch the file soon. We do not rehost media.
    - `children` object[], required: A carousel's items, in order. Empty for a single image or video.
      - `media_type` 'IMAGE' | 'VIDEO', required: An image or a video.
      - `media_url` string, uri, required: The image, or the video file. On Instagram's CDN. Instagram signs the link, and it stops working within a few days, so fetch the file soon. We do not rehost media.
    - `video_duration` number, nullable, required: Seconds.
    - `like_count` integer, nullable, required: `null` when the owner has hidden it.
    - `comments_count` integer, nullable, required: `null` when the source does not give it.
    - `view_count` integer, nullable, required: Views, for videos and Reels.
    - `hashtags` string[], required: The caption's hashtags, without the #.
    - `mentions` string[], required: The usernames the caption mentions, without the @.
    - `location` object, nullable, required: The location tag.
      - `id` string, required: Instagram's id for the location.
      - `name` string, required: The place's name, as the tag shows it.
    - `is_paid_partnership` boolean, nullable, required: Whether it carries the "Paid partnership" label. `null` where that is not known.
  - `meta` Meta, required
    - `request_id` string, required: Quote this if you contact support.
    - `credits_charged` integer, required: The endpoint's published cost. 0 for a demo answer, and for a list emptied because everyone in it asked not to be served. A failed call has no `meta`: it answers with an error, and is refunded.
    - `credits_remaining` integer
    - `cached` boolean, required
    - `fetched_at` string, date-time, required: When the data was actually fetched — the original time on a cache hit, so freshness is always visible.
    - `next_cursor` string, nullable, required: Pass as `cursor` for the next page. `null` on the last page. It lasts as long as the answer is cached.
    - `demo` boolean: Present, and true, on a demo answer (`?demo=true` with no key).
    - `note` string: On a demo answer: what it is, and what a live call costs.

## Other responses

- `400`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `401`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `403`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `404`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `429`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `500`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `501`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `502`: Something went wrong. `error.code` is stable; `error.message` says what to do next.

---

[API](https://skmtc.dev/scrapefield/apis/scrapefield-api.md) · [All operations](https://skmtc.dev/scrapefield/apis/scrapefield-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrapefield/apis/scrapefield-api/revisions/cc5961ac63cf?raw)
