Content API - querying all posts with a link

Is it possible to use the Content API to query all posts with one or more links in the body? (I have about 85 posts and I want to check for broken links)?

Alternatively, is it possibly to outpout all the posts in one continuous file?

I don’t think there’s a way to filter for posts with links, but you can get all of the posts HTML by using /ghost/api/v3/content/posts/?key={key}&fields=html&limit=all

1 Like

Thanks, that works just as well…I’ll just need to find all the HREFs

If you’re using node, you might be able to use cheerio with [href] as the search

1 Like