Is there any sort of API that just offers a simple symbol lookup service? i.e., input a company name and it will tell you the ticker symbol? I've tried just screen-scraping Google Finance, but after a little while it rate limits you and you have to enter a CAPTCHA. I'm trying to batch-lookup about 2000 ticker symbols. Any ideas?
You can use yahoo's symbol lookup like so:
Where query is the company name.
You'll get something like this in return:
YAHOO.Finance.SymbolSuggest.ssCallback(
{
"ResultSet": {
"Query": "ya",
"Result": [
{
"symbol": "YHOO",
"name": "Yahoo! Inc.",
"exch": "NMS",
"type": "S",
"exchDisp": "NASDAQ"
},
{
"symbol": "AUY",
"name": "Yamana Gold, Inc.",
"exch": "NYQ",
"type": "S",
"exchDisp": "NYSE"
},
{
"symbol": "YZC",
"name": "Yanzhou Coal Mining Co. Ltd.",
"exch": "NYQ",
"type": "S",
"exchDisp": "NYSE"
},
{
"symbol": "YRI.TO",
"name": "YAMANA GOLD INC COM NPV",
"exch": "TOR",
"type": "S",
"exchDisp": "Toronto"
},
{
"symbol": "8046.TW",
"name": "NAN YA PRINTED CIR TWD10",
"exch": "TAI",
"type": "S",
"exchDisp": "Taiwan"
},
{
"symbol": "600319.SS",
"name": "WEIFANG YAXING CHE 'A'CNY1",
"exch": "SHH",
"type": "S",
"exchDisp": "Shanghai"
},
{
"symbol": "1991.HK",
"name": "TA YANG GROUP",
"exch": "HKG",
"type": "S",
"exchDisp": "Hong Kong"
},
{
"symbol": "1303.TW",
"name": "NAN YA PLASTIC TWD10",
"exch": "TAI",
"type": "S",
"exchDisp": "Taiwan"
},
{
"symbol": "0294.HK",
"name": "YANGTZEKIANG",
"exch": "HKG",
"type": "S",
"exchDisp": "Hong Kong"
},
{
"symbol": "YAVY",
"name": "Yadkin Valley Financial Corp.",
"exch": "NMS",
"type": "S",
"exchDisp": "NASDAQ"
}
]
}
}
)
Which is JSON and very easy to work with.
Hush... don't tell anybody.