WASHINGTON—Senate lawmakers proposed bipartisan legislation that would require search engines to disclose the algorithms they use in ranking internet searches and give consumers an option for unfiltered searches.

Search engines such as Alphabet Inc.’s Google unit use a variety of measures to filter results for individual searches, such as the user’s browsing activity, search history and geographical location.

Critics...