Référence API
API Substack
Accédez aux données et abonnements des newsletters Substack {{i18n.for_ai_agents}}
Version
1.0.0
Points de terminaison
10
URL de base
https://api.pressmonitor.com/substack/v1 Authentification
Toutes les requêtes utilisent une authentification par jeton Bearer. Ajoutez l'en-tête Authorization à chaque appel.
Authorization: Bearer YOUR_TOKEN GET
/feed Flux
Flux
Paramètres
| Nom | Type | Emplacement | Requis | Description |
|---|---|---|---|---|
| cursor | integer | requête | Non | Curseur |
| tab | string | requête | Non | Onglet |
Exemples de code
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(); Réponses
200 Succès
GET
/profile-activity Activité du profil
Activité du profil
Paramètres
| Nom | Type | Emplacement | Requis | Description |
|---|---|---|---|---|
| profile_id | string | requête | Oui | ID du profil |
Exemples de code
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(); Réponses
200 Succès
GET
/profile-posts Publications du profil
Publications du profil
Paramètres
| Nom | Type | Emplacement | Requis | Description |
|---|---|---|---|---|
| profile_id | string | requête | Oui | ID du profil |
Exemples de code
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(); Réponses
200 Succès
GET
/profile-public Profil public
Profil public
Paramètres
| Nom | Type | Emplacement | Requis | Description |
|---|---|---|---|---|
| handle | string | requête | Oui | Identifiant |
Exemples de code
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(); Réponses
200 Succès
GET
/reader-comment Commentaire du lecteur
Commentaire du lecteur
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| comment_id | string | query | Oui | ID du commentaire |
Exemples de code
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 "Erreur cURL #:" . $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(); Réponses
200 Succès
GET
/reader-comment-replies Réponses aux commentaires des lecteurs
Réponses aux commentaires des lecteurs
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| comment_id | string | query | Oui | ID du commentaire |
Exemples de code
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 "Erreur cURL #:" . $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(); Réponses
200 Succès
GET
/reader-post Publication du lecteur
Publication du lecteur
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| post_id | string | query | Oui | ID de la publication |
Exemples de code
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 "Erreur cURL #:" . $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(); Réponses
200 Succès
GET
/search-people Recherche de personnes
Recherche de personnes
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query | string | query | Oui | Requête de recherche |
| page | integer | query | Non | Page |
Exemples de code
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 "Erreur cURL #:" . $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(); Réponses
200 Succès
GET
/search-post Recherche de publication
Recherche de publication
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query | string | query | Oui | Requête de recherche |
| page | integer | query | Non | Page |
Exemples de code
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 "Erreur cURL #:" . $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(); Réponses
200 Succès
GET
/search-top Recherche top
Recherche top
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query | string | query | Oui | Requête de recherche |
Exemples de code
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(); Réponses
200 Succès