Reddit User Posts
Reddit User Posts is used to fetch Reddit post details and comment data.
- Fetch post details by Reddit post URL
- Return author, score, comment count, and comment list
- Support multiple post URLs in one request
- Suitable for discussion archiving and custom community analysis
Use XCrawl to Fetch Reddit Post Details
Usage
curl -s -X POST 'https://run.xcrawl.com/v1/data' \
-H 'Authorization: Bearer $XCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"engine": "reddit_user_posts",
"url_list": ["https://www.reddit.com/r/pythontips/comments/1gav6bm/how_to_learn_python/"]
}'Request parameter notes:
enginemust bereddit_user_postsurl_listaccepts one or more Reddit post URLs
Response Example
{
"result": [
{
"content": {
"title": "How to learn python",
"author": "aperson0317",
"score": 24,
"num_comments": 26,
"comments": [
{
"review_author": "kuzmovych_y",
"review_context": "r/learnpython"
}
]
}
}
]
}Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
url_list | array | Accepts one or more Reddit post URLs. |
Parameter Notes
- URLs in
url_listshould be full Reddit post URLs
Response Fields
Response data is returned under result[].content.
| Field | Type | Description |
|---|---|---|
title | string | Post title. |
author | string | Post author. |
author_images | string | Author avatar URL. |
score | number | Post score. |
num_comments | number | Number of comments. |
post_url | string | Post URL. |
selftext | string | Post body text. |
video_url | string | Video URL. |
comments | array | Comment list. |
Comment Fields
Each item in comments[] includes:
| Field | Type | Description |
|---|---|---|
review_author | string | Comment author. |
review_release_datetime | number | Comment publish timestamp. |
review_score | number | Comment score. |
review_context | string | Comment text. |
