LinkedIn Company Posts API
List a LinkedIn company page's recent posts by URL: full text, canonical link, publish date, author, engagement counts with a per-reaction breakdown, and attached media.
USD 0.005000 / appel réussi
ID public: social.linkedin.company.posts · Version 1
Tarifs
USD 0.005000 / appel réussi
Démarrage rapide
Recherchez cet outil avec votre clé API, puis inspectez le provider et le endpoint renvoyés avant de lancer une exécution.
Définissez GLOOP_API_BASE sur votre adresse API et GLOOP_API_KEY sur votre clé côté serveur.
curl
curl --fail-with-body "${GLOOP_API_BASE%/}/v1/discover" \
-H "Authorization: Bearer $GLOOP_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"limit": 5,
"query": "LinkedIn Company Posts"
}'Python
import os, json, urllib.request
url = os.environ['GLOOP_API_BASE'].rstrip('/') + "/v1/discover"
headers = {'Authorization': 'Bearer ' + os.environ['GLOOP_API_KEY']}
headers['Content-Type'] = 'application/json'
data = "{\n \"limit\": 5,\n \"query\": \"LinkedIn Company Posts\"\n}".encode('utf-8')
request = urllib.request.Request(url, data=data, headers=headers)
with urllib.request.urlopen(request) as response:
print(json.load(response))Node.js
const url = process.env.GLOOP_API_BASE.replace(/\/$/, '') + "/v1/discover";
const headers = { Authorization: `Bearer ${process.env.GLOOP_API_KEY}` };
headers['Content-Type'] = 'application/json';
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify({
"limit": 5,
"query": "LinkedIn Company Posts"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Documentation API des outils · POST /v1/inspectSchéma d'entrée
{
"additionalProperties": false,
"properties": {
"includeQuotePosts": {
"description": "Include quote posts (posts shared with an added comment). Defaults to true; set false to exclude them.",
"type": "boolean"
},
"includeReposts": {
"description": "Include reposts (posts shared without an added comment). Defaults to true; set false to exclude them.",
"type": "boolean"
},
"limit": {
"description": "Maximum number of posts to return.",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"postedLimit": {
"description": "Only return posts published within this window (default any).",
"enum": [
"any",
"1h",
"24h",
"week",
"month",
"3months",
"6months",
"year"
],
"type": "string"
},
"url": {
"description": "Full LinkedIn company page URL.",
"type": "string"
}
},
"required": [
"url"
],
"title": "LinkedIn company posts input",
"type": "object"
}Schéma de sortie
{
"type": "object"
}