Notes about getting JSON feed from WordPress
Getting Started with the API , https://developer.wordpress.com/docs/api/getting-started/ gives an example of getting JSON posts data using its REST API that works with ravisiyer.wordpress.com blog!
Try https://public-api.wordpress.com/rest/v1.1/sites/ravisiyer.wordpress.com/posts/?number=2&pretty=true in Chrome browser!
So JSON feed using Wordpress REST API works for my (free) blogs too. However, the JSON data format is different from Blogger json feed (v2.0), and seems to be different from Blogger REST API (v3.0) as well.
However this 2023 article does not work for me: A Comprehensive Overview of the WordPress JSON API, https://medium.com/@anne001141/a-comprehensive-overview-of-the-wordpress-json-api-7992e810484b . It says, "Enabling the REST API
Before you can start using the WordPress JSON API, you need to ensure it’s enabled. To do this, navigate to your WordPress admin panel, head to “Settings,” and click on “Permalinks.” Once there, enable the “Plain” permalink structure. This will activate the REST API."
But I could not find Permalinks in Settings! Is that available only for paid WordPress a/cs? [... Now I vaguely remember that something like this may be only for "sites" in WP and not blogs. And "sites" may be only for paid WP a/cs. ... But I am not sure and need to confirm it.] Using https://ravisiyer.wordpress.com/wp-json/wp/v2/posts (as suggested by article) returns a "Not Found" WordPress webpage but within my blog header and main image in Chrome browser.
...
Notes about Blogger and WordPress web feed requests and feed formats, https://ravisiyermisc.blogspot.com/2024/03/notes-about-blogger-and-wordpress-web.html is a useful resource.
Comments
Post a Comment