# Reddit / Reddit Subreddit Posts

Fetch posts from a public subreddit.

```
GET /api/v1/reddit/posts
```

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
Credits: 2 credits per request

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `name` | yes | Subreddit name without r/. | `SkincareAddiction` |
| `sort` | no | hot \| new \| top \| rising. Defaults to new. | `new` |
| `period` | no | Time filter for sort=top. Defaults to week. | `week` |
| `cursor` | no | Pagination cursor from a previous nextCursor. |  |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/reddit/posts?name=SkincareAddiction&sort=new&period=week' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].data.title` | string | Post title. |
| `[].data.author` | string | Author username. |
| `[].data.score` | number | Score. |
| `[].data.num_comments` | number | Comment count. |
| `[].data.permalink` | string | Permalink (use with Comments). |
## Sample response

Successful lookups wrap the payload in `{ ok, platform, resource, params, data, meta }`. `data` is shown below.

```json
{
  "ok": true,
  "platform": "reddit",
  "resource": "posts",
  "params": {
    "name": "SkincareAddiction",
    "sort": "new",
    "period": "week"
  },
  "data": [
    {
      "data": {
        "author": "example_user",
        "num_comments": 812,
        "permalink": "/r/SkincareAddiction/comments/8pv3gg/example/",
        "score": 22353,
        "subreddit": "SkincareAddiction",
        "title": "Example post title"
      },
      "kind": "t3"
    }
  ],
  "meta": {
    "credits_charged": 2,
    "latency_ms": 420,
    "platform": "reddit",
    "resource": "posts",
    "path": "/api/v1/reddit/posts"
  }
}
```

## Links

- HTML docs: https://trysocify.com/docs/api/reddit/posts
- SEO page: https://trysocify.com/reddit/posts
- OpenAPI: https://trysocify.com/openapi.json
- Catalog: https://trysocify.com/catalog.json
