> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# Social Media Platform Email Scraper

Structured Utilities data: send `keywords`. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/social-media-platform-email/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/social-media-platform-email/` with `keywords`. The results are in `data.emails`; send `data.next_cursor` back as `cursor` to get the next page. 7 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/social-media-platform-email/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "keywords=marketing" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/social-media-platform-email/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"keywords": "marketing"},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["emails"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `keywords` | string | yes | e.g. `marketing` | Search keyword (one per call). Required first call. |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `platform` | string | no | `Instagram` | Platform name or any domain. Locked in cursor. |
| `email_domains` | string | no | `@gmail.com` | Comma-separated email domains; empty = any. Locked in cursor. |
| `location` | string | no | — | Optional location term(s). Locked in cursor. |
| `country` | string | no | `us` | Google gl=. Locked in cursor. |
| `language` | string | no | `en` | Google hl=. Locked in cursor. |
| `include_all_emails` | boolean | no | `false` | Locked in cursor. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.emails`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "keyword": "marketing",
    "network": "Instagram.com",
    "page": 1,
    "page_size": 20,
    "emails": [
      {
        "network": "Instagram.com",
        "keyword": "marketing",
        "title": "We are digital marketing experts. We offer services & plans to ...",
        "description": "Strategy & Planning SEO & Analytics Social Media Marketing Content Marketing ... thakurinnovation2058@gmail.com #DigitalMarketing #BrandGrowth ...",
        "url": "https://www.instagram.com/p/DT24GiFkdWe/",
        "email": "thakurinnovation2058@gmail.com",
        "scraped_at": "2026-10-03T07:21:48.617Z"
      }
    ],
    "next_cursor": "zc1.eNrtj7EOgzAMRNOtY7_hZqtKUCemrv0GFEVpCxEiAZSECTH3t2v6CUwg9TxYej6fdEKIz4wOJYKNXZ3b3oEwoiwInvGM0dvcDDGw5dGnbF20gS11sK0374FXn_h2dyu4voaAhQMYVZWSpEj-RmlNMOa5YqQGpGRxI0zRg3Kcaq0XsWedDpB4rP5_7VrnzZ-XjVFfJ8AqQA"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `keyword` | string | `marketing` |  |
| `network` | string | `Instagram.com` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `20` |  |
| `emails` | array | `[1 item]` | The results. |
| `next_cursor` | string | `zc1.eNrtj7EOgzAMRNOtY7_hZqtKUCemrv0GFEVpCxEiA…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `emails[].network` | string | `Instagram.com` |  |
| `emails[].keyword` | string | `marketing` |  |
| `emails[].title` | string | `We are digital marketing experts. We offer se…` |  |
| `emails[].description` | string | `Strategy & Planning SEO & Analytics Social Me…` |  |
| `emails[].url` | string | `https://www.instagram.com/p/DT24GiFkdWe/` |  |
| `emails[].email` | string | `thakurinnovation2058@gmail.com` |  |
| `emails[].scraped_at` | string | `2026-10-03T07:21:48.617Z` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/social-media-platform-email/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {"keywords": "marketing"}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("emails") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Locked into the cursor: `platform`, `email_domains`, `location`, `country`, `language`, `include_all_emails`. Set them on the first call; later pages reuse them.

## Related

- [Contact Extractor](https://docs.scrapier.io/api-reference/utilities/contact-extractor.md): Structured Utilities data: send `urls`. Cursor-paginated, 2 credits per successful call.
- [Industry Email Scraper](https://docs.scrapier.io/api-reference/utilities/industry-email.md): Structured Utilities data: send `queries` and `location`. Cursor-paginated, 2 credits per successful call.
- [Website Content Crawler](https://docs.scrapier.io/api-reference/utilities/website-content-crawler.md): Structured Utilities data: send `urls`. Cursor-paginated, 1 credit per successful call.
