Skip to main content
POST
/
datasets
/
v3
/
scrape
Discover Posts by Subreddit URL
curl --request POST \
  --url https://api.brightdata.com/datasets/v3/scrape \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": [
    {
      "url": "<string>",
      "sort_by": "<string>"
    }
  ]
}
'
[
  {
    "post_id": "1csdf56",
    "url": "https://www.reddit.com/r/learnpython/comments/1csdf56/",
    "user_posted": "newbie_dev",
    "title": "Best resources for learning pandas?",
    "description": "I'm about two weeks into Python...",
    "num_upvotes": 312,
    "num_comments": 41,
    "date_posted": "2026-04-05T14:05:00Z",
    "tag": "Help",
    "community_name": "learnpython",
    "community_url": "https://www.reddit.com/r/learnpython",
    "community_description": "Subreddit for posting questions and asking for general advice about your Python code.",
    "community_members_num": 1120000,
    "community_rank": null,
    "related_posts": [],
    "comments": [],
    "photos": [],
    "videos": []
  }
]

Query Parameters

dataset_id
string
default:"gd_lvz8ah06191smkebj4"
required
The dataset ID used for this request.
Must be set to gd_lvz8ah06191smkebj4 to collect Discover by subreddit URL data.
type
string
default:"discover_new"
Must be set to discover_new.
discover_by
string
default:"subreddit_url"
Must be set to subreddit_url.
notify
boolean
default:false
Whether to send notifications when the request is completed.
include_errors
boolean
default:true
Whether to include errors in the response.

Request Body

input
object[]
required
An array of input objects.

Example

{
  "input": [
    {"url": "https://www.reddit.com/r/learnpython/", "sort_by": "hot"},
    {"url": "https://www.reddit.com/r/datascience/", "sort_by": "top"}
  ]
}
[
  {
    "post_id": "1csdf56",
    "url": "https://www.reddit.com/r/learnpython/comments/1csdf56/",
    "user_posted": "newbie_dev",
    "title": "Best resources for learning pandas?",
    "description": "I'm about two weeks into Python...",
    "num_upvotes": 312,
    "num_comments": 41,
    "date_posted": "2026-04-05T14:05:00Z",
    "tag": "Help",
    "community_name": "learnpython",
    "community_url": "https://www.reddit.com/r/learnpython",
    "community_description": "Subreddit for posting questions and asking for general advice about your Python code.",
    "community_members_num": 1120000,
    "community_rank": null,
    "related_posts": [],
    "comments": [],
    "photos": [],
    "videos": []
  }
]