Database of all Mac models
Try MacTracker. It's available in the App Store and Mac App Store. I hit enter before I finished thinking through my answer. What info do you need, Model Numbers or Model Names?
Over at apple-history.com you can download the html of their Mactracker-like information. Probably wouldn't too terribly difficult to scrape your info from it. Below is an example of the html you can download from them...
<p class='specs'>Family: PowerBook</p>
<p class='specs'>Codename: Tim LC, Tim Lite, Leary, Replacements</p>
<p class='specs'>Gestalt ID: 25</p>
<p class='specs'>Minimum OS: 7.0.1</p>
<p class='specs'>Maximum OS: 7.6.1</p>
<p class='specs'>Introduced: October 1991</p>
<p class='specs'>Terminated: August 1992</p>
<br/><p class='specs'><b>Processor</b></p>
<p class='specs'>CPU: Motorola MC68030</p>
<p class='specs'>CPU Speed: 16 MHz</p>
<p class='specs'>FPU: none</p>
<p class='specs'>Bus Speed: 16 MHz</p>
<p class='specs'>Register Width: 32-bit</p>
<p class='specs'>Data Bus Width: 32-bit</p>
<p class='specs'>Address Bus Width: 32-bit</p>
<p class='specs'>ROM: 1 MB</p>
<p class='specs'>RAM Type: unique</p>
<p class='specs'>Minimum RAM Speed: 100 ns</p>
<p class='specs'>Onboard RAM: 2 MB</p>
<p class='specs'>RAM slots: 1</p>
<p class='specs'>Maximum RAM: 8 MB</p>
<p class='specs'>Level 1 Cache: 256 bytes data, 256 bytes instruction</p>
<p class='specs'>Expansion Slots: modem</p>
etc... etc...