Software Alternatives, Accelerators & Startups

Golang image search api

Unsplash StockSnap.io Google Burst
  1. Unsplash is a website with high-quality free HD images. It has a catalog of more than three hundred thousand striking images that are neatly organized with tags. Read more about Unsplash.
    Pricing:
    • Open Source
    Package scraper Import ( "fmt" "net/http" "strings" "github.com/gin-gonic/gin" "github.com/gocolly/colly" ) Func GetImgs(c *gin.Context) { searchQuery := c.Query("q") res := getSearch(searchQuery) c.JSON(http.StatusOK, res) } Func getSearch(searchQuery string) Images { searchString := strings.Replace(searchQuery, " ", "-", -1) c := colly.NewCollector() c.UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0" c.AllowURLRevisit = true c.DisableCookies() array := []string{} // Find and visit all links c.OnHTML("img[src]", func(e *colly.HTMLElement) { src := e.Attr("src") if src != "" { array = append(array, e.Attr("src")) } }) // Requesting a url for html c.OnRequest(func(r *colly.Request) { fmt.Println("Visiting", r.URL) }) // search query pexelsQuery := strings.Replace(searchString, "-", "%20", -1) stocSnapQuery := strings.Replace(searchString, "-", "+", -1) // c.Visit("https://unsplash.com/s/" + searchString) c.Visit("https://burst.shopify.com/photos/search?utf8=%E2%9C%93&q=" + searchString + "&button=") c.Visit("https://www.pexels.com/search/" + pexelsQuery + "/") c.Visit("https://www.flickr.com/search/?text=" + pexelsQuery) c.Visit("http://www.google.com/images?q=" + stocSnapQuery) c.Visit("https://stocksnap.io/search/" + stocSnapQuery) // return Images{ Count: len(array), Data: array} } Type Images struct { Count int `json:"counts"` Data []string `json:"data"` }.

    #Photos & Graphics #Image Marketplace #Stock Images 496 social mentions

  2. Hundreds of high resolution images added weekly
    Package scraper Import ( "fmt" "net/http" "strings" "github.com/gin-gonic/gin" "github.com/gocolly/colly" ) Func GetImgs(c *gin.Context) { searchQuery := c.Query("q") res := getSearch(searchQuery) c.JSON(http.StatusOK, res) } Func getSearch(searchQuery string) Images { searchString := strings.Replace(searchQuery, " ", "-", -1) c := colly.NewCollector() c.UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0" c.AllowURLRevisit = true c.DisableCookies() array := []string{} // Find and visit all links c.OnHTML("img[src]", func(e *colly.HTMLElement) { src := e.Attr("src") if src != "" { array = append(array, e.Attr("src")) } }) // Requesting a url for html c.OnRequest(func(r *colly.Request) { fmt.Println("Visiting", r.URL) }) // search query pexelsQuery := strings.Replace(searchString, "-", "%20", -1) stocSnapQuery := strings.Replace(searchString, "-", "+", -1) // c.Visit("https://unsplash.com/s/" + searchString) c.Visit("https://burst.shopify.com/photos/search?utf8=%E2%9C%93&q=" + searchString + "&button=") c.Visit("https://www.pexels.com/search/" + pexelsQuery + "/") c.Visit("https://www.flickr.com/search/?text=" + pexelsQuery) c.Visit("http://www.google.com/images?q=" + stocSnapQuery) c.Visit("https://stocksnap.io/search/" + stocSnapQuery) // return Images{ Count: len(array), Data: array} } Type Images struct { Count int `json:"counts"` Data []string `json:"data"` }.

    #Photos & Graphics #Image Marketplace #Stock Images 14 social mentions

  3. 3
    Google Search, also referred to as Google Web Search or simply Google, is a web search engine developed by Google. It is the most used search engine on the World Wide Web
    Https://google.com ... (because why not).

    #Search Engine #Internet Search #Web Search 3735 social mentions

  4. 4
    Burst has thousands of hi-res photos that are free to use.
    Package scraper Import ( "fmt" "net/http" "strings" "github.com/gin-gonic/gin" "github.com/gocolly/colly" ) Func GetImgs(c *gin.Context) { searchQuery := c.Query("q") res := getSearch(searchQuery) c.JSON(http.StatusOK, res) } Func getSearch(searchQuery string) Images { searchString := strings.Replace(searchQuery, " ", "-", -1) c := colly.NewCollector() c.UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0" c.AllowURLRevisit = true c.DisableCookies() array := []string{} // Find and visit all links c.OnHTML("img[src]", func(e *colly.HTMLElement) { src := e.Attr("src") if src != "" { array = append(array, e.Attr("src")) } }) // Requesting a url for html c.OnRequest(func(r *colly.Request) { fmt.Println("Visiting", r.URL) }) // search query pexelsQuery := strings.Replace(searchString, "-", "%20", -1) stocSnapQuery := strings.Replace(searchString, "-", "+", -1) // c.Visit("https://unsplash.com/s/" + searchString) c.Visit("https://burst.shopify.com/photos/search?utf8=%E2%9C%93&q=" + searchString + "&button=") c.Visit("https://www.pexels.com/search/" + pexelsQuery + "/") c.Visit("https://www.flickr.com/search/?text=" + pexelsQuery) c.Visit("http://www.google.com/images?q=" + stocSnapQuery) c.Visit("https://stocksnap.io/search/" + stocSnapQuery) // return Images{ Count: len(array), Data: array} } Type Images struct { Count int `json:"counts"` Data []string `json:"data"` }.

    #Photos & Graphics #Image Marketplace #Vector Art 10 social mentions

Discuss: Golang image search api

Log in or Post with