Платформенная аналитика API
Reddit API
Reddit обслуживает около 121 миллиона активных пользователей ежедневно через форумы, темы обсуждений, текстовые посты, ссылки, изображения и комментарии, что делает его важным для понимания сообществ, отслеживания репутации, получения отзывов о продуктах и поиска ниш.
Справочник API Версия: 1.0.0 14 Точки доступа Аутентификация
Базовый URL
https://api.pressmonitor.com/reddit/v1 Аутентификация
Все запросы используют аутентификацию с токеном Bearer. Добавьте заголовок Authorization ко всем вызовам.
Authorization: Bearer YOUR_TOKEN GET
/get-cursor Получить курсор
Get Cursor
Примеры кода
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(); Ответы
200 Успешно
GET
/new-subreddits Новые сабреддиты
New Subreddits
Примеры кода
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(); Ответы
200 Успешно
GET
/popular-posts Популярные публикации
Popular Posts
Примеры кода
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(); Ответы
200 Успешно
GET
/popular-subreddits Популярные сабреддиты
Popular Subreddits
Примеры кода
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(); Ответы
200 Успешно
GET
/post-details Детали публикации
Post Details
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| post_url | string | query | Да | URL публикации |
Примеры кода
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(); Ответы
200 Успешно
GET
/posts-by-subreddit Публикации по сабреддиту
Posts By Subreddit
Примеры кода
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(); Ответы
200 Успешно
GET
/posts-by-username Публикации пользователя
Posts By Username
Примеры кода
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(); Ответы
200 Успешно
GET
/rising-popular-posts Растущие популярные публикации
Rising Popular Posts
Примеры кода
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(); Ответы
200 Успешно
GET
/search-posts Поиск публикаций
Search Posts
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query | string | query | Да | Поисковый запрос |
Примеры кода
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(); Ответы
200 Успешно
GET
/search-subreddits Поиск сабреддитов
Search Subreddits
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query | string | query | Да | Поисковый запрос |
Примеры кода
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(); Ответы
200 Успешно
GET
/top-comments-by-username Лучшие комментарии пользователя
Top Comments By Username
Примеры кода
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(); Ответы
200 Успешно
GET
/top-popular-posts Лучшие популярные публикации
Top Popular Posts
Примеры кода
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(); Ответы
200 Успешно
GET
/top-posts-by-username Лучшие публикации пользователя
Top Posts By Username
Примеры кода
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(); Ответы
200 Успешно
/comments-by-usernameКомментарии пользователя
Comments By Username
Примеры кода
Ответы