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.

GEThttps://api.roic.ai/v2/countries/list
Request
curl "https://api.roic.ai/v2/countries/list?apikey=YOUR_API_KEY"
Response
200 OK
[
  {
    "country": "United States",
    "country_code": "US",
    "ticker_count": 6500
  },
  {
    "country": "China",
    "country_code": "CN",
    "ticker_count": 800
  }
]

Parameters

Query parameters

formatstring

Response format. Use json for JSON (default) or excel for tab-separated values compatible with Google Sheets and Excel.

Default: jsonValues: jsonexcel

Response

Response fields

countrystring

English name of the country, e.g. United States.

country_codestring

Two-letter ISO 3166-1 alpha-2 country code, e.g. US.

ticker_countnumber

Number of companies headquartered in this country.

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
  • 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