What you are looking for is the Issuer Identifier Number (IIN), which are the first 6 digits of the credit card. Like @pndfam05 mentioned, there are many commercial databases that charge for more than 10 lookups.
But, there is binlist.net that offers either
a data dump on their github repo (raw CSV link), (it seems it is a limited file)
or a freely available RESTful API that allows 10k requests per hour. For this to work, you'd have to have either a list of IINs to check, or you can pass 000000 to 999999 in blocks of 10k, which means 100 hours of total requests (which is not so much).
Here are some details for the REST API:
Make HTTP GET requests to http://www.binlist.net/{format}/{bin}
Supported formats are csv, xml or json.
The JSON response would look like this:
{
"bin":"431940",
"brand":"VISA",
"sub_brand":"",
"country_code":"IE",
"country_name":"Ireland",
"bank":"BANK OF IRELAND",
"card_type":"DEBIT",
"card_category":"",
"latitude":"53",
"longitude":"-8",
"query_time":"365.845us"
}
CSV like this:
"431940","VISA","IE","Ireland","BANK OF IRELAND","DEBIT","","606.649us",
XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Bin>431940</Bin>
<Brand>VISA</Brand>
<SubBrand />
<CountryCode>IE</CountryCode>
<CountryName>Ireland</CountryName>
<Bank>BANK OF IRELAND</Bank>
<CardType>DEBIT</CardType>
<CardCategory />
<Latitude>53</Latitude>
<Longitude>-8</Longitude>
<QueryTime>338.636us</QueryTime>
</Response>
Note: You can always ask them for a full data dump - @bin_list