List All Countries
Retrieve every country represented in the ROIC.ai database. Each entry returns the country name, ISO country code, and the number of companies headquartered in that country. Use this endpoint to understand the geographic coverage of the API, build country-based stock screeners, or populate region filter menus in your application.
The API covers companies from the United States, China, United Kingdom, Canada, and dozens of other countries. Results are live.
GET
https://api.roic.ai/v2/countries/listParameters
Query Parameters
apikeystringrequiredYour API key for authentication.
formatstringoptionalResponse format. Use `json` for JSON (default) or `excel` for tab-separated values compatible with Google Sheets and Excel.
Default:
jsonValues: json, excelCode Examples
curl "https://api.roic.ai/v2/countries/list?apikey=YOUR_API_KEY"Response
Response200 OK
[
{
"country": "United States",
"country_code": "US",
"ticker_count": 6500
},
{
"country": "China",
"country_code": "CN",
"ticker_count": 800
}
]Use Cases
- Build a country filter for a global stock screener with live company counts
- Visualize geographic distribution of public companies on a world map
- Create region-specific investment tools that focus on a particular country's stocks
- Analyze market coverage by region to identify data gaps or opportunities
- Validate country codes before passing them to other filtering endpoints
Related Endpoints
- List Exchanges - Browse exchanges, which are often region-specific
- Company Profile - Get the country of headquarters for a specific company
- List Sectors - Combine country and sector filters for targeted screening