> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Social

> Search and read posts, profiles and comments on Reddit, Instagram, LinkedIn, Pinterest, Facebook, X and Threads. Get a LinkedIn profile, a company, or its latest posts.

Search and read posts, profiles and comments on Reddit, Instagram, LinkedIn, Pinterest, Facebook, X and Threads. Get a LinkedIn profile, a company, or its latest posts. See every field in the [Social reference](/api-reference/endpoint/reddit-search), or try it in the [playground](https://stophy.dev/playground).

## Scrape Reddit search results

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.reddit.search({ query: "typescript" });
  console.log(result.data.results);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.reddit.search(query="typescript")
  print(result["data"]["results"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/reddit/search \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"query":"typescript"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy reddit search typescript
  ```
</CodeGroup>

The response:

```json theme={null}
{
  "success": true,
  "data": {
    "results": [
      {
        "type": "post",
        "postId": "abc123",
        "postUrl": "https://example.com/",
        "title": "Example title",
        "text": "A short, readable summary of the result.",
        "authorId": "abc123",
        "authorUsername": "example",
        "authorUrl": "https://example.com/",
        "subreddit": "example",
        "score": 4.5,
        "upvotePercent": 1,
        "comments": 1,
        "publishedAt": "2026-09-28T12:00:00.000Z",
        "flair": "example",
        "linkUrl": "https://example.com/",
        "thumbnailUrl": "https://example.com/image.jpg",
        "isNsfw": false,
        "isVideo": false,
        "isPinned": false,
        "imageUrls": [
          "https://example.com/image.jpg"
        ],
        "videoUrl": "https://example.com/",
        "videoHlsUrl": "https://example.com/",
        "videoDurationSeconds": 120,
        "pollOptions": [
          {
            "text": "A short, readable summary of the result.",
            "votes": 1
          }
        ],
        "pollTotalVotes": 1234,
        "pollEndsAt": "2026-09-28T12:00:00.000Z",
        "repostOfUrl": "https://example.com/"
      }
    ]
  },
  "creditsUsed": 1,
  "requestId": "28b72093-aa11-414c-b577-ce5b1aa63604"
}
```

## Endpoints

| Endpoint | Cost |
| - | - |
| [Scrape Reddit search results](/api-reference/endpoint/reddit-search) | 1 credit (no key needed) |
| [Scrape a Reddit post and its comments](/api-reference/endpoint/reddit-post) | 1 credit |
| [Scrape a subreddit and its posts](/api-reference/endpoint/reddit-subreddit) | 1 credit |
| [Scrape a Reddit user's profile, posts and comments](/api-reference/endpoint/reddit-user) | 1 credit |
| [Scrape where else a link was shared on Reddit](/api-reference/endpoint/reddit-discussions) | 1 credit |
| [Scrape Reddit's popular or newest communities](/api-reference/endpoint/reddit-subreddits) | 1 credit |
| [Scrape an Instagram profile and its posts](/api-reference/endpoint/instagram-profile) | 2 credits |
| [Scrape an Instagram profile's reels](/api-reference/endpoint/instagram-profile-reels) | 1 credit |
| [Scrape an Instagram post or reel](/api-reference/endpoint/instagram-post) | 1 credit |
| [Scrape the comments of an Instagram post](/api-reference/endpoint/instagram-comments) | 1 credit |
| [Scrape a LinkedIn company page](/api-reference/endpoint/linkedin-company) | 1 credit |
| [Scrape a public LinkedIn profile](/api-reference/endpoint/linkedin-profile) | 2 credits |
| [Scrape a person's or company's public LinkedIn posts](/api-reference/endpoint/linkedin-posts) | 1 credit |
| [Scrape Pinterest search results](/api-reference/endpoint/pinterest-search) | 1 credit |
| [Scrape a Pinterest pin](/api-reference/endpoint/pinterest-pin) | 1 credit (no key needed) |
| [Scrape a Pinterest board and its pins](/api-reference/endpoint/pinterest-board) | 1 credit |
| [Scrape a Pinterest profile and its pins](/api-reference/endpoint/pinterest-profile) | 1 credit |
| [Scrape a public Facebook page's details](/api-reference/endpoint/facebook-page) | 1 credit |
| [Scrape a public Facebook page's posts](/api-reference/endpoint/facebook-page-posts) | 1 credit |
| [Scrape a public Facebook post, reel or video](/api-reference/endpoint/facebook-post) | 1 credit |
| [Scrape the comments of a public Facebook post](/api-reference/endpoint/facebook-post-comments) | 1 credit |
| [Scrape an X profile](/api-reference/endpoint/x-profile) | 1 credit (no key needed) |
| [Scrape an X post](/api-reference/endpoint/x-post) | 1 credit (no key needed) |
| [Scrape a Threads profile](/api-reference/endpoint/threads-profile) | 1 credit |
| [Scrape a Threads profile's posts](/api-reference/endpoint/threads-profile-posts) | 1 credit |
| [Scrape a Threads post and its replies](/api-reference/endpoint/threads-post) | 1 credit |

## More ways to call it

### Scrape an Instagram profile and its posts

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.instagram.profile({ username: "natgeo" });
  console.log(result.data.results);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.instagram.profile(username="natgeo")
  print(result["data"]["results"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/instagram/profile \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"username":"natgeo"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy instagram profile --username natgeo
  ```
</CodeGroup>

### Scrape a public LinkedIn profile

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.linkedin.profile({ profileId: "satyanadella" });
  console.log(result.data);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.linkedin.profile(profile_id="satyanadella")
  print(result["data"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/linkedin/profile \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"profileId":"satyanadella"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy linkedin profile --profileId satyanadella
  ```
</CodeGroup>

<Tip>Reddit search, Pinterest pins, X profiles and X posts work without a key. Instagram profile and LinkedIn profile cost 2 credits. Endpoints that return a `cursor` or take a `page` give you more pages. See [Page through results](/guides/paging).</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.