Most large and medium sized U.S. libraries are listed in volume 1 of R.R.Bowker s American Library Directory volume 2 lists libraries in Canada and Mexico.
Many states also have depository libraries.
You can find law libraries and other special libraries in the front of the SLA Union List . Special libraries are listed by subject at the end of the Special Libraries Directory of Greater New York unfortunately, the most recent edition seems to be 1991. The Unified Court System funds a public law library in every county in New York State. Who in Special Libraries , which lists all the SLA member libraries. Also, many regional SLA chapters produce Union Lists that provide contact information on special libraries in the area.