Inteligência de Plataforma API
Reddit API
O Reddit serve cerca de 121 milhões de usuários ativos diariamente por meio de fóruns, tópicos, postagens de texto, links, imagens e comentários, tornando-o importante para percepção da comunidade, monitoramento de reputação, feedback de produtos e descoberta de nichos.
Referência da API Versão: 1.0.0 14 Pontos finais Autenticação
URL base
https://api.pressmonitor.com/reddit/v1 Autenticação
Todas as requisições usam autenticação por token Bearer. Adicione o cabeçalho Authorization a cada chamada.
Authorization: Bearer YOUR_TOKEN GET
/get-cursor Obter Cursor
Get Cursor
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/get-cursor const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/get-cursor", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/get-cursor" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/get-cursor", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/get-cursor") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/new-subreddits Novos Subreddits
New Subreddits
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/new-subreddits const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/new-subreddits", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/new-subreddits" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/new-subreddits", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/new-subreddits") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/popular-posts Posts Populares
Popular Posts
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/popular-posts const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/popular-posts", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/popular-posts" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/popular-posts", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/popular-posts") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/popular-subreddits Subreddits Populares
Popular Subreddits
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/popular-subreddits const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/popular-subreddits", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/popular-subreddits" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/popular-subreddits", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/popular-subreddits") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/post-details Detalhes do Post
Post Details
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| post_url | string | query | Sim | URL do Post |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/reddit/v1/post-details?post_url=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/post-details?post_url=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/post-details" querystring = {"post_url":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/post-details?post_url=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/post-details?post_url=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/posts-by-subreddit Posts por Subreddit
Posts By Subreddit
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/posts-by-subreddit const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/posts-by-subreddit", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/posts-by-subreddit" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/posts-by-subreddit", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/posts-by-subreddit") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/posts-by-username Posts por Nome de Usuário
Posts By Username
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/posts-by-username const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/posts-by-username", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/posts-by-username" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/posts-by-username", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/posts-by-username") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/rising-popular-posts Posts Populares em Ascensão
Rising Popular Posts
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/rising-popular-posts const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/rising-popular-posts", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/rising-popular-posts" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/rising-popular-posts", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/rising-popular-posts") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/search-posts Pesquisar Posts
Search Posts
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| query | string | query | Sim | Consulta de pesquisa |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/reddit/v1/search-posts?query=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/search-posts?query=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/search-posts" querystring = {"query":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/search-posts?query=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/search-posts?query=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/search-subreddits Pesquisar Subreddits
Search Subreddits
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| query | string | query | Sim | Consulta de pesquisa |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/reddit/v1/search-subreddits?query=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/search-subreddits?query=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/search-subreddits" querystring = {"query":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/search-subreddits?query=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/search-subreddits?query=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/top-comments-by-username Principais Comentários por Usuário
Top Comments By Username
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/top-comments-by-username const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/top-comments-by-username", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/top-comments-by-username" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/top-comments-by-username", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/top-comments-by-username") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/top-popular-posts Principais Posts Populares
Top Popular Posts
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/top-popular-posts const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/top-popular-posts", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/top-popular-posts" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/top-popular-posts", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/top-popular-posts") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/top-posts-by-username Principais Posts por Usuário
Top Posts By Username
Exemplos de Código
curl --request GET \ --url https://api.pressmonitor.com/reddit/v1/top-posts-by-username const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/reddit/v1/top-posts-by-username", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/reddit/v1/top-posts-by-username" response = requests.request("GET", url) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/reddit/v1/top-posts-by-username", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/reddit/v1/top-posts-by-username") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
/comments-by-usernameComentários por Nome de Usuário
Comments By Username
Exemplos de Código
Respostas