# Reddit 近期作品

GET /v1/reddit/posts

pending_activation · $0.004 / call

## 参数

- subreddit — 社区名称

- cursor — 沿用同一查询，将上页 next_cursor 原样传入。

## curl

```
curl "https://datawevo.com/v1/reddit/posts?subreddit=space" -H "Authorization: Bearer $DATAWEVO_KEY"
```

## JavaScript

```
const response = await fetch("https://datawevo.com/v1/reddit/posts?subreddit=space", {
  headers: { Authorization: "Bearer " + process.env.DATAWEVO_KEY }
});
console.log(await response.json());
```

## Python

```
import os, requests

response = requests.get(
    "https://datawevo.com/v1/reddit/posts?subreddit=space",
    headers={"Authorization": "Bearer " + os.environ["DATAWEVO_KEY"]},
    timeout=25,
)
print(response.json())
```

## 示例响应

```json
{
  "request_id": "req_example",
  "mode": "sandbox",
  "data": [
    {
      "type": "post",
      "platform": "reddit",
      "id": "sample_001",
      "text": "Sample observation",
      "likes": 12,
      "replies": 12,
      "subreddit": "space"
    }
  ],
  "page": {
    "returned": 1,
    "next_cursor": null
  },
  "billing": {
    "currency": "USD",
    "units": 1,
    "unit": "call",
    "micro_usd": 4000
  },
  "elapsed_ms": 12
}
```
