Load more comments from a thread
curl --request POST \
--url https://api.stophy.dev/v1/reddit/comments/more \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"limit": 100
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cursor: '<string>', limit: 100})
};
fetch('https://api.stophy.dev/v1/reddit/comments/more', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/reddit/comments/more"
payload = {
"cursor": "<string>",
"limit": 100
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"comments": [
{
"url": "<string>",
"score": 0,
"depth": 0,
"isSubmitter": true,
"isPinned": true,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"text": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"children": "<array>",
"repliesCursor": "<string>"
}
],
"cursor": "<string>"
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Reddit
Reddit more comments API
Call the Reddit more comments API to get comments, as JSON or markdown. 2 credits.
POST
/
v1
/
reddit
/
comments
/
more
Load more comments from a thread
curl --request POST \
--url https://api.stophy.dev/v1/reddit/comments/more \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"limit": 100
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cursor: '<string>', limit: 100})
};
fetch('https://api.stophy.dev/v1/reddit/comments/more', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/reddit/comments/more"
payload = {
"cursor": "<string>",
"limit": 100
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"comments": [
{
"url": "<string>",
"score": 0,
"depth": 0,
"isSubmitter": true,
"isPinned": true,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"text": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"children": "<array>",
"repliesCursor": "<string>"
}
],
"cursor": "<string>"
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
reddit.comments.more - Returns:
datahascomments. - Cost: 2 credits. Failed calls cost nothing.
- Paging: Yes. Send the
cursorfrom the response to get the next page. See Paging.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.reddit.comments.more({ cursor: "t1_kz3x9k2,t1_kz3y4l1" });
console.log(result.data.comments);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.reddit.comments.more(cursor="t1_kz3x9k2,t1_kz3y4l1")
print(result["data"]["comments"])
curl -X POST https://api.stophy.dev/v1/reddit/comments/more \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"cursor":"t1_kz3x9k2,t1_kz3y4l1"}'
stophy reddit comments more t1_kz3x9k2,t1_kz3y4l1
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json