Substack Publication API
API health
- 24h health
- Normal
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Look up a Substack publication from its homepage link and get its name, handle, custom domain, language, author, top posts and subscriber count when disclosed. The link needs a recognizable Substack handle, since custom domains may not parse, and nothing comes from the author's dashboard.
Send POST https://api.everyinfra.com/api/v1/social with platform set to substack and action set to publication. Price $1.39 per 1,000 requests ($0.001389 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
#Please help me write a data collection script with the EveryInfra Substack Publication endpoint (substack/publication).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to substack and action to publication, and put the parameters inside params.
- Required parameters:
- url: Specifies the target Substack resource link. Use publication homepages for publication and publication_posts, or direct /p/ post links for post and comments.
- Returns one object. Main fields: id, handle, name, url, custom_domain, bio, language, subscriber_count, payments_enabled, avatar_url, cover_url, author_name; 14 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=substack.
- Example request body:
{
"platform": "substack",
"action": "publication",
"params": {
"url": "https://astralcodexten.substack.com"
}
}
- Price: $1.39 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | substack | Platform identifier, fixed value. |
action | body | string | Yes | publication | Capability identifier, fixed value. |
url | body.params | string | Yes | - | Specifies the target Substack resource link. Use publication homepages for publication and publication_posts, or direct /p/ post links for post and comments. The publication action requires a URL containing a recognizable Substack handle (custom domains may not parse), whereas publication_posts accepts custom domain links directly. |
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "substack",
"action": "publication",
"params": {
"url": "https://astralcodexten.substack.com"
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
#{ "id": "req_…", "platform": "substack", "action": "publication", "results": { "handle": "•••", "name": "Astral Codex Ten | Scott Alexander", "url": "https://astralcodexten.substack.com", "custom_domain": "astralcodexten.com", "bio": "P(A|B) = [P(A)*P(B|A)]/P(B), all the rest is commentary. Click to read Astral Codex Ten, by Scott Alexander, a Substack publication.", "language": "en", "payments_enabled": true, "avatar_url": "https://substackcdn.com/•••", "platform": "substack" }, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
handle | Keeps the platform's own meaning |
name | Name of the object itself, for account, product and business capabilities. |
url | Link to the record on the platform. |
custom_domain | Keeps the platform's own meaning |
bio | Profile bio written by the account; may contain line breaks and emoji. |
language | Content language code (for example zh, en) as judged by the platform; it can be wrong. |
subscriber_count | Keeps the platform's own meaning |
payments_enabled | Keeps the platform's own meaning |
avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
cover_url | Keeps the platform's own meaning |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
author_name | Author's display name. |
author_username | Author's username (@handle), usually usable in URLs. |
top_posts | Keeps the platform's own meaning |
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
Official references
#Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- Substack: Author Pages and Publication Sites Are Distinct Address Objects ↗
A Substack author handle maps to substack.com/@handle, whereas publication websites can use subdomain.substack.com. This reference verifies object and address distinctions; custom domain resolution capabilities remain strictly bound by the parameter rules of the corresponding action on this page.
Checked 2026-09-04