Version 1 Documentation
FlatWeb API lets you create your own search UI while using the FlatWeb API endpoint to perform searches.
<input id="search">
<button onclick="search()">Search</button>
<script>
function search() {
const query =
document.getElementById("search").value;
window.location.href =
"https://api.flatweb.pw/v1/search/api?q=" +
encodeURIComponent(query);
}
</script>
query variable.https://api.flatweb.pw/v1/search/api?q=cats
Redirects to
https://www.google.com/search?q=cats
<input id="search" placeholder="Search...">
<button onclick="search()">Search</button>
<script>
function search(){
const query =
document.getElementById("search").value;
window.location.href =
"https://api.flatweb.pw/v1/search/api?q=" +
encodeURIComponent(query);
}
</script>
You can now build any search engine UI you like. Just send the user's query
to /v1/search/api, and the API will handle redirecting the search.