You may get some "free" legal advice from just about any patent law firm, assuming they believe you intend to hire them when they advise you to pursue a patent application. Beyond that, your preliminary counseling sessions, prior to filing, may cost you a few hundred dollars, to draft and file a provisional patent application (filing fee $65 for many sole inventors). To run further searches and draft "claims" to your invention may cost upward of $8,000 for the simplest of inventions and significantly more for anything complicated. That covers an initial application in the USA. To file applications in other countries will cost more for each country.
Learn the basics of patent process and the terminology by reading a few web pages before you waste the time of a patent attorney. Take along everything you have about your invention and how it is somehow better than all of your competition.
wikipedia: patent, patent application