Home > Software design >  How to search a particular website from a flutter app
How to search a particular website from a flutter app

Time:11-02

i need to search wikipedia or amazon from my flutter app for a given keyword. For example, if somebody enters iphone, i can call amazon and show results in my app. When they click on the returned result, amazon is launched.

Please suggest how can i achieve it.

CodePudding user response:

You have to use API from Amazon and Wikipedia. For Amazon You can Use this API. For Wikipedia This might be helpful.

If you want to directly Open search Result(Like Search Box =>User Type in Search Box => open amazon for search result) then you can use something like this.

As Per URL of Search Result

https://www.amazon.com/s?k=iphone

so create Url Like

    getResult(String Keyword){
    
    String url = "https://www.amazon.com/s?k =$keyword"
    print(url)
      return url
    }

CodePudding user response:

Well you have to get that website API that is if it's available, you can only do that with there API

CodePudding user response:

You can use the package web_scraper to do the web scraping after you issue an HTTP GET call to the query URL.

web_scraper 0.1.4

  • Related