You could definitely do it in 30g but 40 to 50 would be better.
Here is the thing 30 gallons can be limiting….. this hobby can be addicting. Seahorses are amazing and most folks get a few in their tank and want more. I personally find groups do best. I never keep less than 4 in a tank. They are sedintary for the most part and in my experience I find many folks want compatible tankmates for a little more activity. So in that reguard 30 g may be limiting.
In addition there is alot of info out there about their need for verticle space. This is true they do need verticle space for courtship and breerding but given horizontal space they will use it and perhaps even reward you with increased activity.