fix the hardcoded metadata endpoint to be searched