def _nominatim_request(
    params: OrderedDict[str, int | str],
    *,
    request_type: str = "search",
) -> list[dict[str, Any]]:
    """
    Send a HTTP GET request to the Nominatim API and return response.

    Parameters
    ----------
    params
        Key-value pairs of parameters.
    request_type
        Which Nominatim API endpoint to query, one of {"search", "reverse",
        "lookup"}.

    Returns
    -------
    response_json
        The Nominatim API's response.
    """
    if request_type not in {"search", "reverse", "lookup"}:  # pragma: no cover
        msg = "Nominatim `request_type` must be 'search', 'reverse', or 'lookup'."
        raise ValueError(msg)

    # add nominatim API key to params if one has been provided in settings
    if settings.nominatim_key is not None:
        params["key"] = settings.nominatim_key

    # prepare Nominatim API URL and see if request already exists in cache
    url = settings.nominatim_url.rstrip("/") + "/" + request_type
    prepared_url = str(requests.Request("GET", url, params=params).prepare().url)
    cached_response_json = _http._retrieve_from_cache(prepared_url)
    if isinstance(cached_response_json, list):
        return cached_response_json

    # how long to pause before request, in seconds. Per the Nominatim usage
    # policy: "an absolute maximum of 1 request per second" is allowed.
    pause = 1
    hostname = _http._hostname_from_url(url)
    msg = f"Pausing {pause} second(s) before making HTTP GET request to {hostname!r}"
    utils.log(msg, level=lg.INFO)
    time.sleep(pause)

    # transmit the HTTP GET request
    msg = f"Get {prepared_url} with timeout={settings.requests_timeout}"
    utils.log(msg, level=lg.INFO)
    response = requests.get(
        url,
        params=params,
        timeout=settings.requests_timeout,
        headers=_http._get_http_headers(),
        **settings.requests_kwargs,
    )

    # handle 429 and 504 errors by pausing then recursively re-trying request
    if response.status_code in {429, 504}:  # pragma: no cover
        error_pause = 55
        msg = (
            f"{hostname!r} responded {response.status_code} {response.reason}: "
            f"we'll retry in {error_pause} secs"
        )
        utils.log(msg, level=lg.WARNING)
        time.sleep(error_pause)
        return _nominatim_request(params, request_type=request_type)

    response_json = _http._parse_response(response)
    if not isinstance(response_json, list):
        msg = "Nominatim API did not return a list of results."
        raise InsufficientResponseError(msg)
    _http._save_to_cache(prepared_url, response_json, response.ok)
    return response_json

    Send a HTTP GET request to the Nominatim API and return response.

    Parameters
    ----------
    params
        Key-value pairs of parameters.
    request_type
        Which Nominatim API endpoint to query, one of {"search", "reverse",
        "lookup"}.

    Returns
    -------
    response_json
        The Nominatim API's response.
    
osmnx/_nominatim.py