# Get Countries GET https://api-stg.transak.com/api/v2/countries The Get Countries is a public API endpoint that allows you to retrieve the list of supported countries in the Transak ecosystem. This API helps you identify which countries are supported for KYC verification, and supported documents like passports, driving licenses, and national identity cards. Reference: https://docs.transak.com/api/public/get-countries ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: countries-api version: 1.0.0 paths: /api/v2/countries: get: operationId: get-countries summary: Get Countries description: >- The Get Countries is a public API endpoint that allows you to retrieve the list of supported countries in the Transak ecosystem. This API helps you identify which countries are supported for KYC verification, and supported documents like passports, driving licenses, and national identity cards. tags: - '' responses: '200': description: Countries fetched successfully content: application/json: schema: $ref: '#/components/schemas/get-countries_Response_200' servers: - url: https://api-stg.transak.com components: schemas: ApiV2CountriesGetResponsesContentApplicationJsonSchemaResponseItems: type: object properties: alpha2: type: string alpha3: type: string isAllowed: type: boolean isLightKycAllowed: type: boolean name: type: string currencyCode: type: string supportedDocuments: type: array items: type: string required: - alpha2 - alpha3 - isAllowed - isLightKycAllowed - name - currencyCode - supportedDocuments title: ApiV2CountriesGetResponsesContentApplicationJsonSchemaResponseItems get-countries_Response_200: type: object properties: response: type: array items: $ref: >- #/components/schemas/ApiV2CountriesGetResponsesContentApplicationJsonSchemaResponseItems required: - response title: get-countries_Response_200 ``` ## SDK Code Examples ```python Success import requests url = "https://api-stg.transak.com/api/v2/countries" response = requests.get(url) print(response.json()) ``` ```javascript Success const url = 'https://api-stg.transak.com/api/v2/countries'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Success package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api-stg.transak.com/api/v2/countries" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Success require 'uri' require 'net/http' url = URI("https://api-stg.transak.com/api/v2/countries") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-stg.transak.com/api/v2/countries") .asString(); ``` ```php Success request('GET', 'https://api-stg.transak.com/api/v2/countries'); echo $response->getBody(); ``` ```csharp Success using RestSharp; var client = new RestClient("https://api-stg.transak.com/api/v2/countries"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift Success import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://api-stg.transak.com/api/v2/countries")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```