LinkedMash Analytics API
Read account-level and post-level LinkedIn performance metrics.
Read account-level and post-level LinkedIn performance metrics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/linkedmash-com:linkedmash-com-analytics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: LinkedMash Analytics API
version: 1.0.0
description: The public LinkedMash API for retrieving saved LinkedIn posts, managing labels and drafts, scheduling content, and reading analytics.
license:
name: LinkedMash Terms of Service
url: https://www.linkedmash.com/terms
contact:
name: LinkedMash Support
email: support@linkedmash.com
url: https://www.linkedmash.com/api-docs/getting-started
servers:
- url: https://api.linkedmash.com
description: LinkedMash production API
tags:
- name: Analytics
description: Read account-level and post-level LinkedIn performance metrics.
paths:
/v1/analytics:
get:
tags:
- Analytics
summary: Get Analytics
description: 'Get aggregate account analytics over a date range. Requires a paid Premium or Lifetime plan.
GET /v1/analytics returns account-level LinkedIn performance over a date range: impressions, reactions, comments and reshares as a metrics object, plus the current follower count. date_range takes a shorthand window such as 7d, 30d or 90d.
The numbers come from LinkedIn through the connected account, so they are only as complete as what LinkedIn exposes for that profile, and they reflect the connected account''s own posts rather than anything in the saved-posts library.'
operationId: getAnalytics
externalDocs:
description: Get Analytics documentation
url: https://www.linkedmash.com/api-docs/get-analytics
security:
- oauthClientCredentials:
- analytics:read
- bearerAuth: []
- apiKeyHeader: []
parameters:
- name: date_range
in: query
required: false
description: Date range to summarize, e.g. 7d, 30d, or 90d.
schema:
type: string
example: 30d
responses:
'200':
description: Successful response.
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- status
- data
properties:
status:
type: boolean
data:
type: object
additionalProperties: false
required:
- metrics
- followers
properties:
metrics:
type: object
additionalProperties: false
required:
- impressions
- reactions
- comments
- reshares
properties:
impressions:
type: integer
reactions:
type: integer
comments:
type: integer
reshares:
type: integer
followers:
type: integer
example:
status: true
data:
metrics:
impressions: 48210
reactions: 1932
comments: 412
reshares: 188
followers: 12480
'401':
description: Unauthorized. The Authorization header is missing or the key is not a valid LinkedMash API key. Create or rotate keys on the API page in your LinkedMash settings.
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- status
- code
- error
properties:
status:
type: boolean
code:
type: string
error:
type: string
example:
status: false
code: UNAUTHORIZED
error: Unauthorized
'402':
description: Payment Required. Returned with code SUBSCRIPTION_REQUIRED. The content API requires a Premium or Lifetime plan; Reader and free accounts get this on every /v1/posts, /v1/queue, /v1/schedule, /v1/media and /v1/analytics call.
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequiredResponse'
example:
status: false
code: SUBSCRIPTION_REQUIRED
error: The content API requires a Premium or Lifetime plan.
message: The content API requires a Premium or Lifetime plan.
upgrade_url: https://www.linkedmash.com/pricing
required_plan: creator
plan_name: Premium
price:
currency: usd
annual:
amount: 12000
interval: year
display: $120/yr
unlocks:
- bulk_actions
- labels
- vector_search
- ai_assistant
- export_unlimited
checkout_url: https://www.linkedmash.com/upgrade?from=api_subscription_required_creator
pricing_url: https://www.linkedmash.com/pricing.md
upgrade_source: api_subscription_required_creator
upgrade:
why: The content API requires a Premium or Lifetime plan.
unlocks:
- bulk_actions
- labels
- vector_search
- ai_assistant
- export_unlimited
url: https://www.linkedmash.com/upgrade?from=api_subscription_required_creator
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
'500':
description: Server Error. Something failed on our side. The body carries message "Failed to fetch analytics". Retry once; if it persists the request is not the problem.
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/analytics/posts:
get:
tags:
- Analytics
summary: Get Post Analytics
description: 'Get per-post analytics over a date range. Requires a paid Premium or Lifetime plan.
GET /v1/analytics/posts returns per-post performance for recently published posts, over the window given by date_range, capped by limit. It is the breakdown behind the totals in GET /v1/analytics.
Use it to rank your own posts by engagement, to feed a weekly report, or to close the loop on a scheduling workflow — publish through /v1/posts and read the outcome back here.'
operationId: getPostAnalytics
externalDocs:
description: Get Post Analytics documentation
url: https://www.linkedmash.com/api-docs/get-post-analytics
security:
- oauthClientCredentials:
- analytics:read
- bearerAuth: []
- apiKeyHeader: []
parameters:
- name: date_range
in: query
required: false
description: Date range to summarize, e.g. 7d, 30d, or 90d.
schema:
type: string
example: 30d
- name: limit
in: query
required: false
description: Maximum number of posts to return.
schema:
type: integer
example: 10
responses:
'200':
description: Successful response.
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- status
- data
properties:
status:
type: boolean
data:
type: array
items:
type: object
additionalProperties: false
required:
- id
- text
- impressions
- engagements
- likes
- comments
properties:
id:
type: string
text:
type: string
impressions:
type: integer
engagements:
type: integer
likes:
type: integer
comments:
type: integer
example:
status: true
data:
- id: '7336731872414035968'
text: '5 lessons from shipping every week for a year:'
impressions: 18420
engagements: 742
likes: 531
comments: 96
'401':
description: Unauthorized. The Authorization header is missing or the key is not a valid LinkedMash API key. Create or rotate keys on the API page in your LinkedMash settings.
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- status
- code
- error
properties:
status:
type: boolean
code:
type: string
error:
type: string
example:
status: false
code: UNAUTHORIZED
error: Unauthorized
'402':
description: Payment Required. Returned with code SUBSCRIPTION_REQUIRED. The content API requires a Premium or Lifetime plan; Reader and free accounts get this on every /v1/posts, /v1/queue, /v1/schedule, /v1/media and /v1/analytics call.
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequiredResponse'
example:
status: false
code: SUBSCRIPTION_REQUIRED
error: The content API requires a Premium or Lifetime plan.
message: The content API requires a Premium or Lifetime plan.
upgrade_url: https://www.linkedmash.com/pricing
required_plan: creator
plan_name: Premium
price:
currency: usd
annual:
amount: 12000
interval: year
display: $120/yr
unlocks:
- bulk_actions
- labels
- vector_search
- ai_assistant
- export_unlimited
checkout_url: https://www.linkedmash.com/upgrade?from=api_subscription_required_creator
pricing_url: https://www.linkedmash.com/pricing.md
upgrade_source: api_subscription_required_creator
upgrade:
why: The content API requires a Premium or Lifetime plan.
unlocks:
- bulk_actions
- labels
- vector_search
- ai_assistant
- export_unlimited
url: https://www.linkedmash.com/upgrade?from=api_subscription_required_creator
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
'500':
description: Server Error. Something failed on our side. The body carries message "Failed to fetch post analytics". Retry once; if it persists the request is not the problem.
headers:
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
X-RateLimit-Daily-Limit:
$ref: '#/components/headers/RateLimitDailyLimit'
X-RateLimit-Daily-Remaining:
$ref: '#/components/headers/RateLimitDailyRemaining'
X-RateLimit-Daily-Reset:
$ref: '#/components/headers/RateLimitDailyReset'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
PaywallPrice:
type: object
properties:
amount:
type: integer
description: Price in minor units (cents).
interval:
type: string
enum:
- month
- year
display:
type: string
description: Human-readable price, e.g. "$14/mo".
PaymentRequiredResponse:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
- type: object
description: 'Paywall detail carried on every 402. Additive: `status`, `code`, `error` and `upgrade_url` keep their previous meaning, so a client that ignores these fields behaves exactly as before.'
properties:
upgrade_url:
type: string
format: uri
description: Public pricing page. Always present; prefer `checkout_url`, which opens on the plan that lifts this block.
required_plan:
type: string
enum:
- reader
- creator
description: The plan that lifts this block and that `checkout_url` opens. Currently always `creator` (shown as Premium); `reader` is kept in the enum for older clients.
plan_name:
type: string
description: Display name of `required_plan`, e.g. "Premium".
unlocks:
type: array
items:
type: string
description: Stable capability ids that `required_plan` turns on, e.g. `vector_search`. Not marketing copy — safe to branch on.
price:
type: object
description: Price of `required_plan` in USD. /pricing localises currency, so treat this as the reference price rather than the amount that will be charged.
properties:
currency:
type: string
const: usd
monthly:
$ref: '#/components/schemas/PaywallPrice'
annual:
$ref: '#/components/schemas/PaywallPrice'
checkout_url:
type: string
format: uri
description: In-app upgrade URL that starts Stripe Checkout for `required_plan` (monthly) when opened by a signed-in human. Logged-out clicks fall back to /pricing. The API cannot mint a Stripe session for an API-key caller.
upgrade_source:
type: string
description: Identifier for the wall that was hit, carried as `?from=` on `checkout_url`.
upgrade:
type: object
description: Agent-facing upgrade guidance. Same facts as the flat paywall fields, nested so a model can surface why / what unlocks / where to go without parsing prose. Also present on 429 `FREE_TIER_DAILY_LIMIT`.
required:
- why
- unlocks
- url
properties:
why:
type: string
description: Human reason this request was refused.
unlocks:
type: array
items:
type: string
description: Stable capability ids a paid plan turns on.
url:
type: string
format: uri
description: https checkout URL for the plan that lifts this wall. Same value as `checkout_url`.
ErrorResponse:
type: object
description: LinkedMash API error envelope. 429 `FREE_TIER_DAILY_LIMIT` also includes the paywall `upgrade` object documented on PaymentRequiredResponse.
required:
- status
properties:
status:
type: boolean
const: false
code:
type: string
description: Stable machine-readable error code.
error:
type: string
description: Human-readable error message.
message:
type: string
description: Human-readable error message used by legacy endpoints.
anyOf:
- required:
- error
- required:
- message
headers:
RateLimitRemaining:
description: Requests remaining for the authenticated account in the current window.
schema:
type: integer
minimum: 0
RateLimitDailyRemaining:
description: Free-tier daily calls remaining in the current UTC day. Omitted for paid accounts.
schema:
type: integer
minimum: 0
RateLimitDailyLimit:
description: Free-tier daily API/MCP call quota for accounts without an active subscription. Omitted for paid accounts.
schema:
type: integer
example: 100
RateLimitDailyReset:
description: Unix timestamp of the next UTC midnight, when the free daily quota resets. Omitted for paid accounts.
schema:
type: integer
RateLimitReset:
description: Unix timestamp when the current fixed window resets.
schema:
type: integer
RateLimitLimit:
description: Maximum requests allowed in the current fixed window.
schema:
type: integer
example: 120
securitySchemes:
oauthClientCredentials:
type: oauth2
description: Short-lived, permission-scoped machine token using an existing LinkedMash API key id and secret as the confidential client credentials.
flows:
clientCredentials:
tokenUrl: https://api.linkedmash.com/auth/oauth/token
scopes:
library:read: Read saved posts, labels, authors, smart folders, memories, digests, and interests.
library:write: Manage labels, smart folders, memories, saved-post state, and interest corrections.
content:read: Read drafts, publishing queues, schedules, and media metadata.
content:write: Create, update, delete, schedule, and publish content or media.
analytics:read: Read account, post, and growth analytics.
exports:read: Read export job status.
exports:write: Create PDF, CSV, and JSON exports.
bearerAuth:
type: http
scheme: bearer
bearerFormat: LinkedMash API key
description: 'Pass a LinkedMash API key as `Authorization: Bearer <key>`.'
apiKeyHeader:
type: apiKey
in: header
name: linkedmash-api-key
description: Alternative header for clients that cannot set a Bearer authorization header.
externalDocs:
description: LinkedMash API documentation
url: https://www.linkedmash.com/api-docs/getting-started