I developed a RESTful JSON API (https://mapping-api.herokuapp.com/) for this purpose.
You can provide the exchange name, and the API returns all companies listed at the exchange in JSON format. You can also send any CIK, company ticker, or company name, and the API returns the mapping.
Examples
List Companies by Exchange
Request: GET https://mapping-api.herokuapp.com/exchange/:exchange
Replace :exchange
at the end of the URL with the exchange you are looking for, e.g. NASDAQ, or NYSE.
You can use regular expressions to retrieve companies listed on different exchanges. For example, if you want to list all companies listed on NASDAQ and NYSE, you can use https://mapping-api.herokuapp.com/exchange/NASDAQ|NYSE
Example: https://mapping-api.herokuapp.com/exchange/NASDAQ
Response:
[
{
"cik": "0001099290",
"ticker": "AAC",
"name": "Sinocoking Coal & Coke Chemical Industries Inc",
"sic": "3312",
"exchange": "NASDAQ",
"irs": "593404233"
},
{
"cik": "0000006201",
"ticker": "AAL",
"name": "American Airlines Group Inc",
"sic": "4512",
"exchange": "NASDAQ",
"irs": "751825172"
},
{
"cik": "0000008177",
"ticker": "AAME",
"name": "Atlantic American Corp",
"sic": "6311",
"exchange": "NASDAQ",
"irs": "581027114"
},
// cut for brevity
]
Resolve by CIK
Request: GET https://mapping-api.herokuapp.com/cik/:cik
Replace :cik
at the end of the URL with the CIK you want to resolve.
Example: https://mapping-api.herokuapp.com/cik/0001318605
Response:
[
{
"cik": "0001318605",
"ticker": "TSLA",
"name": "Tesla Motors Inc",
"sic": "3711",
"irs": "912197729"
}
]
Removing trailing 0
from the CIK also works. Instead of using 0001318605
,
you can use 1318605
. Same result.
Resolve by Ticker
Request: GET https://mapping-api.herokuapp.com/ticker/:ticker
Replace :ticker
at the end of the URL with the ticker you want to resolve.
Example: https://mapping-api.herokuapp.com/ticker/tsla
Response:
[
{
"cik": "0001318605",
"ticker": "TSLA",
"exchange": "NASDAQ",
"name": "Tesla Motors Inc",
"sic": "3711",
"irs": "912197729"
},
{
"cik": "0000863456",
"ticker": "WTSLA",
"exchange": "",
"name": "Wet Seal Inc",
"sic": "5621",
"irs": "330415940"
}
]
Two companies are returned because WTSLA
contains tsla
. The API uses regular expressions under the hood allowing complex search queries. If you only want to retrieve exact matches, then use ^
as prefix, and $
as suffix. For example, ^tsla&
(see below).
Example (exact match): GET https://mapping-api.herokuapp.com/ticker/^tsla$
Response:
[
{
"cik": "0001318605",
"ticker": "TSLA",
"exchange": "NASDAQ",
"name": "Tesla Motors Inc",
"sic": "3711",
"irs": "912197729"
}
]
Resolve by Name
Request: GET https://mapping-api.herokuapp.com/name/:name
Replace :name
at the end of the URL with the company name you want to resolve.
Example: https://mapping-api.herokuapp.com/name/Tesla
Response:
[
{
"cik": "0001318605",
"ticker": "TSLA",
"exchange": "NASDAQ",
"name": "Tesla Motors Inc",
"sic": "3711",
"irs": "912197729"
}
]
Providing Tesla Motors
as name returns the same result. You can use regular expressions here as well.