An H1B visa requires an employee sponsor, so, yes — you need a job offer before you apply for your visa. Search for American employers online. Another option would be to look for American companies that have offices in your home country and apply to work there. Then, you can look for openings that would allow you to transfer to the US.