Hello Nikhil,
This is the best way, from that you can do anything. You will get the splunk result which is filtered and analyzed in a proper format.
Other than this, we will have SDKs with Python,C# etc..
So it depends on you what you want to do. Other one also we have REST API call using curl.
http://dev.splunk.com/view/csharp-sdk/SP-CAAAEPK
... View more