I downloaded the freebase data dump and I want to use it to get information about a query just like how I do it using the web API. How exactly do I do it? I tried using a simple zgrep but the result was a mess and takes too much time. Any graceful way to do it (preferably something that plays nicely with python)?
The Freebase dump is in RDF format.  The easiest way to query it is to dump it (or a subset of it) into an RDF store.  It'll be quicker to query, but you'll need to pay the database load time up front first.
How to search freebase data dump