I am creating an Android app for a client whose site is in WordPress. I want to access the posts, but I don't know which API to hit. One of the APIs I found after some searching is https://www.<mysite>
.com/wp-json/wp/v2/posts. This gives a ton of key value pairs, So I was tying to access this site via this URL. But for a particular content
key, this is giving the following output:
"content": {
"rendered": "<p> </p>\r\n\r\n<p>The next class for “MICROVITA” will be on “Aug 07th, 2020 at 8:00 PM IST / 10:30 AM EST on “MicroVita Science(माइक्रोवाइटा विषय समापन )” by Ac.Vimalananda Avt. </p>\r\n\r\n\r\n\r\n\n<div class=\"dpn-zvc-shortcode-op-wrapper\">\n\t <table class=\"vczapi-shortcode-meeting-table\">\n <tr class=\"vczapi-shortcode-meeting-table--row1\">\n <td>Meeting ID</td>\n <td>000000000</td>\n </tr>\n <tr class=\"vczapi-shortcode-meeting-table--row2\">..."
}
I am not sure how to retrieve the important information from such HTML content. Maybe that's a question better suited for other stack communities, but what I want to know is that if it is the expected behavior from a WordPress site API? Or is there some other API or plugin which might give me a better response?
To summarize:
- which WordPress API could give me a list of all the articles as JSON?
- I found a particular API doing the above same task as point (1.). is it a standard one?
- Is it a standard behavior of WordPress APIs to have HTML content directly inside their JSON key-value pairs?