> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/twitter/profiles-handle-media>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/twitter/profiles-handle-media.mdx>

---

# X (Twitter) Profile Media API

Page through the photos or videos an X account has posted, as tweet rows with their media, in the shared Social Fetch envelope.

`GET /v1/twitter/profiles/{handle}/media` reads the Photos or Videos tab of an X profile: pass `type=photos` or `type=videos`. X keeps them as separate tabs, so read each one you need. Rows are the same as on `GET /v1/twitter/profiles/{handle}/tweets`: `data.tweets` with text, metrics, author and `media`, and `data.page` for the next page.

Branch on `data.lookupStatus`: `found`, `private` for a protected account, or `not_found`. A short page is not the end; keep passing `data.page.nextCursor` while `data.page.hasMore` is true, with the same `type`.

## Request

- **Endpoint:** `GET /v1/twitter/profiles/{handle}/media`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by handle
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/twitter/profiles/handle/media/get)
- **Platform page:** [/platforms/twitter](https://www.socialfetch.dev/platforms/twitter)

## FAQ

### How do I get the photos or videos an X account posted?

Call `GET /v1/twitter/profiles/{handle}/media?type=photos` (or `type=videos`) with your Social Fetch API key. Read `data.tweets`; each row carries its `media`.

### Can I get photos and videos in one call?

No. X shows them as two tabs, so call once with `type=photos` and once with `type=videos`.

### How does pagination work?

When `data.page.hasMore` is true, pass `data.page.nextCursor` as `cursor` with the same handle and `type`. Pages can be shorter than `limit`.

### How much does the profile media endpoint cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
