import requests


def search_onda_catalog(search, fmt='json') -> dict:
    """Search on ONDA Catalog."""
    base_uri = 'https://catalogue.onda-dias.eu/dias-catalogue/Products'

    query = {
        '$search': search,
        '$format': fmt
    }

    req = requests.get(base_uri, params=query, timeout=90)

    req.raise_for_status()

    content = req.json()

    return content