I need to find whether a word is verb or noun or it is both
For example, the word is \"search\" it can be both noun and a verb but stanford parser gives NN tag to i
The Stanford parser parses words in the context of a sentence. To use your example of "search", in any given sentence, "search" will be a noun or a verb, but not both a noun and a verb in the same sentence.
What you're looking for is a dictionary look up. I've found several online dictionaries that would give you the information you're looking for. Here's an example from the Free Online Dictionary for the word "search".
It turns out that "search" can be a noun, verb, intransitive verb, and transitive verb.
I could not find an application programming interface (API) that would give you the same type of information as you find on the Free Online Dictionary web page. If your vocabulary list is limited, you could build your own API.