If you're a Marine, you can request up to 10 days of house hunting PTAD once you have PCS orders, and use it before you leave, after you arrive, or split between the two, with approval (MARADMIN 625/24). If you're a Sailor, house hunting PTDY gives you up to 5 workdays, which can stretch to 10 calendar days when combined with weekends, holidays and liberty (MILPERSMAN 1320-210).
Either way, the time is permissive, so it isn't charged as leave. The travel is on your own dime, and any regular leave you add is charged as normal. Put the request in with your command early, since approval and timing depend on your unit.
Here's how I make those days count. Before you fly in, your pre-approval is done, we've narrowed neighborhoods by video, and your tours are lined up, so you can write an offer that same week. The goal is a home under contract by the time your days are up.