Package 'substackR'

Title: Access Substack Data via API
Description: Fetch latest, top, search or single posts from a Substack publication.
Authors: Jason R. [aut, cre]
Maintainer: Jason R. <[email protected]>
License: MIT + file LICENSE
Version: 0.0.9
Built: 2026-05-14 06:34:36 UTC
Source: https://github.com/posocap/substackr

Help Index


Latest Posts

Description

Fetch the latest posts from a Substack publication.

Usage

get_substack_latest(publication_url, limit = 10L, offset = 0L)

Arguments

publication_url

Character, e.g. "example.substack.com".

limit

Integer ⁠[1–50]⁠, default 10.

offset

Integer ⁠>= 0⁠, default 0.

Value

A data.frame (possibly zero‐row) of post records.


Get Single Post

Description

Fetch a single post by its slug. Returns a one‐row data.frame, or zero‐row if not found.

Usage

get_substack_post(publication_url, slug)

Arguments

publication_url

Character.

slug

Character. Post slug.

Value

A data.frame with one row (or zero rows if missing).


Top Posts

Description

Fetch the most popular posts from a Substack publication.

Usage

get_substack_top(publication_url, limit = 10L, offset = 0L)

Arguments

publication_url

Character, e.g. "example.substack.com".

limit

Integer ⁠[1–50]⁠, default 10.

offset

Integer ⁠>= 0⁠, default 0.

Value

A data.frame (possibly zero‐row) of post records.


Set your Substack API Key

Description

Store your key once per session. Subsequent calls to other functions will use this key automatically.

Usage

set_substack_key(key)

Arguments

key

A single string: your Substack API key.

Value

Invisibly TRUE if successful.