Inteligência de Plataforma API
Substack API
O Substack atinge milhões de leitores e apoia mais de 5 milhões de assinaturas pagas em newsletters, ensaios, podcasts e vídeos, tornando-o importante para liderança de pensamento, públicos próprios e receita direta ao leitor.
Referência da API Versão: 1.0.0 10 Pontos finais Autenticação
URL base
https://api.pressmonitor.com/substack/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
/feed Feed
Feed
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| cursor | integer | query | Não | Cursor |
| tab | string | query | Não | Aba |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/feed?cursor=SOME_INTEGER_VALUE&tab=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/feed?cursor=SOME_INTEGER_VALUE&tab=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/substack/v1/feed" querystring = {"cursor":"SOME_INTEGER_VALUE","tab":"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/substack/v1/feed?cursor=SOME_INTEGER_VALUE&tab=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/substack/v1/feed?cursor=SOME_INTEGER_VALUE&tab=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/profile-activity Atividade do perfil
Profile Activity
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| profile_id | string | query | Sim | ID do perfil |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/profile-activity?profile_id=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/profile-activity?profile_id=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/substack/v1/profile-activity" querystring = {"profile_id":"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/substack/v1/profile-activity?profile_id=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/substack/v1/profile-activity?profile_id=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/profile-posts Postagens do perfil
Profile Posts
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| profile_id | string | query | Sim | ID do perfil |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/profile-posts?profile_id=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/profile-posts?profile_id=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/substack/v1/profile-posts" querystring = {"profile_id":"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/substack/v1/profile-posts?profile_id=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/substack/v1/profile-posts?profile_id=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/profile-public Perfil público
Profile Public
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| handle | string | query | Sim | Identificador |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/profile-public?handle=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/profile-public?handle=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/substack/v1/profile-public" querystring = {"handle":"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/substack/v1/profile-public?handle=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/substack/v1/profile-public?handle=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/reader-comment Comentário do leitor
Reader Comment
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| comment_id | string | query | Sim | ID do comentário |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/reader-comment?comment_id=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/reader-comment?comment_id=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/substack/v1/reader-comment" querystring = {"comment_id":"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/substack/v1/reader-comment?comment_id=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/substack/v1/reader-comment?comment_id=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/reader-comment-replies Respostas aos comentários dos leitores
Reader Comment Replies
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| comment_id | string | query | Sim | ID do comentário |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/reader-comment-replies?comment_id=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/reader-comment-replies?comment_id=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/substack/v1/reader-comment-replies" querystring = {"comment_id":"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/substack/v1/reader-comment-replies?comment_id=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/substack/v1/reader-comment-replies?comment_id=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/reader-post Postagem do leitor
Reader Post
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| post_id | string | query | Sim | ID da postagem |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/reader-post?post_id=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/reader-post?post_id=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/substack/v1/reader-post" querystring = {"post_id":"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/substack/v1/reader-post?post_id=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/substack/v1/reader-post?post_id=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/search-people Pesquisar pessoas
Search People
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| query | string | query | Sim | Consulta de pesquisa |
| page | integer | query | Não | Página |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/search-people?query=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/search-people?query=SOME_STRING_VALUE&page=SOME_INTEGER_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/substack/v1/search-people" querystring = {"query":"SOME_STRING_VALUE","page":"SOME_INTEGER_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/substack/v1/search-people?query=SOME_STRING_VALUE&page=SOME_INTEGER_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/substack/v1/search-people?query=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/search-post Pesquisar postagem
Search Post
Parâmetros
| Nome | Tipo | Localização | Obrigatório | Descrição |
|---|---|---|---|---|
| query | string | query | Sim | Consulta de pesquisa |
| page | integer | query | Não | Página |
Exemplos de Código
curl --request GET \ --url 'https://api.pressmonitor.com/substack/v1/search-post?query=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/search-post?query=SOME_STRING_VALUE&page=SOME_INTEGER_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/substack/v1/search-post" querystring = {"query":"SOME_STRING_VALUE","page":"SOME_INTEGER_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/substack/v1/search-post?query=SOME_STRING_VALUE&page=SOME_INTEGER_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/substack/v1/search-post?query=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso
GET
/search-top Pesquisar destaques
Search Top
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/substack/v1/search-top?query=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/substack/v1/search-top?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/substack/v1/search-top" 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/substack/v1/search-top?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/substack/v1/search-top?query=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Respostas
200 Sucesso