Skip to content

GET /countries

This endpoint allows you to retrieve a list of countries for a given keyword

https://{{ env }}.academiclabs.com/api/v1/countries

Headers

Value Type Required Description
Authorization string required Your API_KEY received by AcademicLabs

Query String

Value Type Required Description
q string required A string based value for a given keyword
limit integer optional Number of results that will be fetched (default: 20)

Example

curl --location --request GET "https://sandbox.academiclabs.com/api/v1/countries?q=bel" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer Your.API.Key-HERE"

Responses

application/json

200

[
    {
        "id": 30,
        "name": "Belize"
    },
    {
        "id": 19,
        "name": "Belgium"
    },
    {
        "id": 29,
        "name": "Belarus"
    }
]

400

{
    "errors": [
        "Parameter q not found"
    ]
}