def METHOD_NAME(query, params):
    if not query:
        return None
    args = {
        'query': query,
        'apiKey': api_key,
    }
    api_url = base_url + '/engine'
    if seekr_category == 'news':
        api_url += '/v2/newssearch'
    elif seekr_category == 'images':
        api_url += '/imagetab'
    elif seekr_category == 'videos':
        api_url += '/videotab'
    params['url'] = f"{api_url}?{urlencode(args)}"
    if params['pageno'] > 1:
        nextpage = params['engine_data'].get('nextpage')
        if nextpage:
            params['url'] = nextpage
    return params