import urllib.parse
import requests

def web_searcher(query: str):
    from urllib.parse import quote
    encoded_query = quote(query)
    url = 'https://s.jina.ai/' + encoded_query
    headers = {
    'Authorization': 'Bearer jina_8fc99db105ed48d7ab6a76ecd117e8e9GkNoWHY3tbmIMYSwQ6GAgzmr6c7z',
    'X-Return-Format': 'markdown'
    }

    response = requests.get(url, headers=headers)

    # print(response.text)
    return str(response.text)


