SDK & Export API

Data Types and Article Shape

Last updated June 4, 2026

Data Types and Article Shape

All of these types are importable from @rankhiker/sdk:

ts
import type {
  RankHikerArticle,
  RankHikerArticleSummary,
  RankHikerAuthor,
  RankHikerTocItem,
  RankHikerFaqItem,
  ListArticlesResponse,
  GetArticleResponse,
} from '@rankhiker/sdk';

RankHikerArticleSummary

Returned by listArticles, listArticlesRaw (inside articles), and getArticleById. It includes the full HTML content but omits the toc, faq, and key takeaways.

FieldTypeNotes
idstringArticle id.
titlestringArticle title.
slugstringURL slug.
contentstringFull article body as HTML (see note below).
excerptstringShort summary.
metaDescriptionstringSEO meta description.
focusKeywordstringPrimary SEO keyword.
tagsstring[]Article tags.
featuredImagestring (optional)Cover image URL.
readingTimenumberEstimated minutes to read.
authorRankHikerAuthorAuthor name and avatar.
publishedAtstring (optional)ISO publish date.
publishedUrlstring (optional)Canonical published URL.
originalUrlstring (optional)Backward-compat alias of publishedUrl.
### RankHikerArticle

Extends RankHikerArticleSummary with the fields below. Returned only by getArticleBySlug.

FieldTypeNotes
tableOfContentsRankHikerTocItem[]Heading outline.
faqRankHikerFaqItem[]Question / answer pairs.
keyTakeawaysstring[]Bullet summary.
viewsnumberView count.
wordCountnumberTotal words.
### RankHikerAuthor
FieldType
namestring
avatarstring
### RankHikerTocItem
FieldType
idstring
titlestring
levelnumber
### RankHikerFaqItem
FieldType
questionstring
answerstring
### Response envelopes

listArticlesRaw and the slug endpoint both return an envelope with a syncedAt cursor.

ts
interface ListArticlesResponse {
  articles: RankHikerArticleSummary[];
  syncedAt: string;
}

interface GetArticleResponse { article: RankHikerArticle; syncedAt: string; }

listArticles unwraps to articles, and getArticleBySlug unwraps to article (or null). Use listArticlesRaw when you need syncedAt.

Content is HTML

content is the article body produced by the RankHiker editor, delivered as HTML, not Markdown. The React renders it with dangerouslySetInnerHTML and the Vue renders it with innerHTML.

If your articles are stored as Markdown, convert to HTML before rendering (for example with marked), or supply a custom renderer (the render prop in React or the default slot in Vue) to handle the body yourself.

Was this article helpful?