How to query WordPress from another application?

We're building an iOS app for BarbadosPropertyList.com. The iOS app needs to query the website and download recent listings data, including titles, datestamps, thumbnails and custom fields.

We would like to know the best practice for querying WordPress data from an external app?

Topic ios api Wordpress

Category Web



Luckily, there's a number of ways to do this so there's no "right way" per se; it's whatever is easiest for you. In my opinion, the path of least resistance is to setup a custom RSS feed. You can have it up and running in 10 minutes and only include the exact listings you want.


there's also the json api plugin http://wordpress.org/extend/plugins/json-api/ it's pretty robust, and probably easiest to use.


different solutions

  • use the rss or atom-feed (each is xml) and parse it; has always fast and sure the post and data inside; easy to use with different langugage, all frameworks has implement for parse xml.

  • use the xmlrpc interface; but is optional in WP and you must read the documentation for the API

  • scan the wesite, parse the html; but not sure, different errors and more.

  • you can also include the wp-load.php from the install and use all wp-solutions in php, query and so on; but i think it is in problem to get th rights form the users of your App.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.