i have the latest installation of wordpress. what i want to do is this:
Suppose i have a site at www.mysite.com and it is running wordpress now i want to create API for mobile app to get data from site using php.
can i create separate API for to get data from wordpress site?
if it can, How to create?
You can try WP REST API. Install this plugin to your wordpress site then, you can access your site data through api calls.
Install JSON API plugin for web services here is the link https://wordpress.org/plugins/json-api/
you can also make extra web service and change webservice by modifying plugin files.
Try - WP REST API V2
http://v2.wp-api.org/
downlaod plugin and install it.
https://wordpress.org/plugins/json-rest-api/
just type /wp-json/wp/v2/posts
in end of your site url and you will get all post.
for get all post
www.mysite.com/wp-json/wp/v2/posts
For the search functionality - search test post
/wp-json/wp/v2/posts?filter[s]=test
much more details from this link http://v2.wp-api.org/reference/posts/
Note for best result use latest version of WP
other is you can also try Json api plugin but this 1 is best.