Patents are granted only to those inventions that are new, useful, and non-obvious. It is the job of the patent office to compare each patent application with what others have done to see if the described invention is new and non-obvious. A patentability search is performed by an inventor (or her attorney) before the application is filed to determine the same thing--is the invention new and non-obvious.
To evaluate whether an invention appears to be new and non-obvious in a patentability search, the "prior art" is examined to find similar devices and methods that pre-date the invention. The concept of prior art includes all public disclosures before the filing date of a patent application, including US patents and patent applications, patents and applications from other countries, web pages, advertisements, and any physically created items or previously provided services.
The objective of a patentability search is to assess the novelty and non-obviousness (according to the USC 102 and 103) of the provided invention disclosure by the client. A patentability search is essential before moving to the patent office as it lays foundation for patent drafters to claim the right scope of the invention and further avoid issues of validity.