← All integrations
JS SDK
Pull articles via REST API + npm package.
Install
npm install @earlyseo/blogScaffold
npx @earlyseo/blog initEnvironment
EARLYSEO_SITE_ID=<uuid>
EARLYSEO_API_KEY=es_xxxxxxxxxxxxxxxxxxxxFetch published articles
import { getArticles } from "@earlyseo/blog";
const { articles } = await getArticles({
siteId: process.env.EARLYSEO_SITE_ID,
apiKey: process.env.EARLYSEO_API_KEY,
});FAQ
How do I authenticate?
Pass siteId and apiKey as query params. Both are issued in /settings/integrations.
Does the SDK return raw or styled HTML?
Both. contentRawHtml is the unstyled CMS-injectable version; contentHtml + contentCss is the standalone preview bundle.