Objective
Import content from WordPress into Seed Hypermedia, turning posts/pages into documents in a site?
Import workflow
Check if WordPress API is available:
Look at /wp-json/ of a website
Confirm it supports /wp/v2/posts
Fetch posts and pages:
Use pagination (e.g. ?page=1&per_page=100)
Optionally fetch media to get image URLs
Normalize the data:
Convert raw HTML to seed blocks.
Convert metadata (title, date, etc.)
Create a site for these documents?
Possible libraries
wordpress-rest-api (unofficial wrapper)
fetch since the API is just JSON
Edge cases
No API available
API partially supported (e.g. posts but not pages)
Large number of documents (pagination)
Broken HTML content
Questions
Should I just try calling API with /wp-json/? Apparently API key is only needed for private content or authenticated actions.
/wp-json/wp/v2/posts – blog posts
/wp-json/wp/v2/pages – static pages
/wp-json/wp/v2/media – images or other attachments
/wp-json/wp/v2/categories, /tags
Each post includes:
title
content (in HTML)
date, modified
author
slug, link
Gabo H Beaumont Eric Vicenti horacio is my understanding of the project correct?