You live in the county, township, burough, or city. Each may have a building department that issues permits. You need to look in your phone book government pages for the building department nearest you whether that is a city or county. Give them a call and they will likely provide you with a code requirement for railings. So if you live in Harrisburg or York, call the city. If you live in Dauphin or York county call the county.
In general local codes are going to range from 36 to 42" height and 4 to 9" spacing. In most cases if you build at 38" height and 4" spindle spacing you will hit the code. But, why guess, the answer is a phone call away.