Question: How to differentiate git pull request commit and direct checkin commit to a branch using git api or command line ? 

Why i need this? 

I need to findout how to get all direct checkins which bypassed pull request mechanism...

Answer: 
Pure Git as a version control system is not aware of any pull request functionality. There is no reference to something like this in the [official documentation](https://www.git-scm.com/). The pull request feature is provided by services such as [github.com](https://github.com/) and [bitbucket.org](https://bitbucket.org/) as additional functionality. 

But nevertheless, if you merge a branch into another using a pull request on one of these platforms, you might be able to distinct merges via pull requests from direct merges by inspecting the commit messages of the merge. I have just checked one of my github.com repositories. There, the commit messages coming from pull requests look like this: "Merge pull request #8 from foo/bar", where `foo/bar` represents the source branch. You might therefore be able to differentiate by looking for such preformatted commit messages.
From git's point of view, there's no difference between a revision that came from a PR and another that was just committed and pushed. That might be information you *could* get from your provider if you are using bitbucket or github (and I say *could* in the sense that I have **no idea** if they make it available somehow). But on git's DB? There's nothing about that, to the best of my knowledge.