Python backend to find better search terms