How to query raw HTML with REST API on rich text fields?

The official kits allow you appropriately render the content of the Rich Text field. Another way of doing this is by using @prismicio/helpers alone. You'll be able to render the content as text or as plain HTML, like so:

import * as prismicH from '@prismicio/helpers'

const contentHTML = prismicH.asHTML(prismicDoc.data.example_rich_text)

console.log(contentHTML)
//  Output: <p>Example Rich Text Value</p>

const contentText = prismicH.asText(prismicDoc.data.example_rich_text)

console.log(contentText)
//  Output: "Example Rich Text Value"

Learn more: