curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"keyword":"machine learning","date":"Past week","num_of_posts":100},{"keyword":"python tips","date":"Past month","num_of_posts":50}],"limit_per_input":10}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lvz8ah06191smkebj4¬ify=false&include_errors=true&type=discover_new&discover_by=keyword"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lvz8ah06191smkebj4",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "keyword",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"keyword": "machine learning",
"date": "Past week",
"num_of_posts": 100,
},
{
"keyword": "python tips",
"date": "Past month",
"num_of_posts": 50,
},
],
"limit_per_input": 10,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lvz8ah06191smkebj4",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "keyword",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [
{
keyword: "machine learning",
date: "Past week",
num_of_posts: 100,
},
{
keyword: "python tips",
date: "Past month",
num_of_posts: 50,
},
],
limit_per_input: 10,
}),
});
console.log(await response.text());
[
{
"post_id": "1bsdf34",
"url": "https://www.reddit.com/r/MachineLearning/comments/1bsdf34/",
"user_posted": "ml_researcher",
"title": "New paper on transformer efficiency",
"description": "Sharing a recent paper...",
"num_upvotes": 842,
"num_comments": 54,
"date_posted": "2026-04-03T09:14:00Z",
"tag": "Research",
"community_name": "MachineLearning",
"community_url": "https://www.reddit.com/r/MachineLearning",
"community_description": "Beginners to experts.",
"community_members_num": 2900000,
"community_rank": null,
"related_posts": [],
"comments": [],
"photos": [],
"videos": []
}
]
Reddit
Discover Reddit posts by keyword
Discover Reddit posts that match a search keyword with the Bright Data Scraper API. Send POST /datasets/v3/scrape with dataset_id gd_lvz8ah06191smkebj4.
POST
/
datasets
/
v3
/
scrape
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"keyword":"machine learning","date":"Past week","num_of_posts":100},{"keyword":"python tips","date":"Past month","num_of_posts":50}],"limit_per_input":10}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lvz8ah06191smkebj4¬ify=false&include_errors=true&type=discover_new&discover_by=keyword"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lvz8ah06191smkebj4",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "keyword",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"keyword": "machine learning",
"date": "Past week",
"num_of_posts": 100,
},
{
"keyword": "python tips",
"date": "Past month",
"num_of_posts": 50,
},
],
"limit_per_input": 10,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lvz8ah06191smkebj4",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "keyword",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [
{
keyword: "machine learning",
date: "Past week",
num_of_posts: 100,
},
{
keyword: "python tips",
date: "Past month",
num_of_posts: 50,
},
],
limit_per_input: 10,
}),
});
console.log(await response.text());
[
{
"post_id": "1bsdf34",
"url": "https://www.reddit.com/r/MachineLearning/comments/1bsdf34/",
"user_posted": "ml_researcher",
"title": "New paper on transformer efficiency",
"description": "Sharing a recent paper...",
"num_upvotes": 842,
"num_comments": 54,
"date_posted": "2026-04-03T09:14:00Z",
"tag": "Research",
"community_name": "MachineLearning",
"community_url": "https://www.reddit.com/r/MachineLearning",
"community_description": "Beginners to experts.",
"community_members_num": 2900000,
"community_rank": null,
"related_posts": [],
"comments": [],
"photos": [],
"videos": []
}
]
Query Parameters
string
default:"gd_lvz8ah06191smkebj4"
required
The dataset ID used for this request.
Must be set to
gd_lvz8ah06191smkebj4 to collect Discover by keyword data.string
default:"discover_new"
Must be set to
discover_new.string
default:"keyword"
Must be set to
keyword.boolean
default:false
Whether to send notifications when the request is completed.
boolean
default:true
Whether to include errors in the response.
Request Body
object[]
required
An array of input objects.
Show properties
Show properties
Example
{
"input": [
{"keyword": "machine learning", "date": "Past week", "num_of_posts": 100},
{"keyword": "python tips", "date": "Past month", "num_of_posts": 50}
]
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"keyword":"machine learning","date":"Past week","num_of_posts":100},{"keyword":"python tips","date":"Past month","num_of_posts":50}],"limit_per_input":10}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lvz8ah06191smkebj4¬ify=false&include_errors=true&type=discover_new&discover_by=keyword"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lvz8ah06191smkebj4",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "keyword",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"keyword": "machine learning",
"date": "Past week",
"num_of_posts": 100,
},
{
"keyword": "python tips",
"date": "Past month",
"num_of_posts": 50,
},
],
"limit_per_input": 10,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lvz8ah06191smkebj4",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "keyword",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [
{
keyword: "machine learning",
date: "Past week",
num_of_posts: 100,
},
{
keyword: "python tips",
date: "Past month",
num_of_posts: 50,
},
],
limit_per_input: 10,
}),
});
console.log(await response.text());
[
{
"post_id": "1bsdf34",
"url": "https://www.reddit.com/r/MachineLearning/comments/1bsdf34/",
"user_posted": "ml_researcher",
"title": "New paper on transformer efficiency",
"description": "Sharing a recent paper...",
"num_upvotes": 842,
"num_comments": 54,
"date_posted": "2026-04-03T09:14:00Z",
"tag": "Research",
"community_name": "MachineLearning",
"community_url": "https://www.reddit.com/r/MachineLearning",
"community_description": "Beginners to experts.",
"community_members_num": 2900000,
"community_rank": null,
"related_posts": [],
"comments": [],
"photos": [],
"videos": []
}
]
Was this page helpful?