bing-search-sdk-for-net/samples/BingSearchSamples/BingVisualSearch
Joe Perez 9e17765f63
Edit readme
Under Note, should there be a Revisions section?
2021-04-05 16:34:35 -07:00
..
TestImages adding seperate samples 2020-12-06 18:28:38 +02:00
.gitignore adding seperate samples 2020-12-06 18:28:38 +02:00
ExampleAbstraction.cs fixing sample project name 2021-02-15 16:05:33 +02:00
ExampleAttribute.cs fixing sample project name 2021-02-15 16:05:33 +02:00
Microsoft.Bing.VisualSearch.Samples.csproj adding reference to package 2021-03-02 11:45:52 +02:00
Microsoft.Bing.VisualSearch.Samples.sln adding reference to package 2021-03-02 11:45:52 +02:00
Program.cs fixing sample project name 2021-02-15 16:05:33 +02:00
README.md Edit readme 2021-04-05 16:34:35 -07:00
SampleCollectionAttribute.cs fixing sample project name 2021-02-15 16:05:33 +02:00
VisualSearchSamples.cs fixing sample project name 2021-02-15 16:05:33 +02:00

README.md

The Bing Visual Search SDK sample

This sample shows you how to get up and running using the Bing Visual Search Nuget package. It covers a few use cases and expresses best practices for interacting with the data from this API. For more information on the Bing Visual Search API v7, go to: https://docs.microsoft.com/en-us/bing/search-apis/bing-visual-search/overview. Complete reference documentation including descriptions of parameters, their values, and supported markets is available here.

If you want to amend samples to suit your needs, the most important file is VisualSearchSamples.cs. See how you can access this file in the Quickstart section below.

Features

This sample references the Bing Visual Search SDK, which is a stand-alone package for the v7 version of this API. An all-in-one package including all the Bing Search APIs will be available in the future.

This example provides sample use cases of the Bing Visual Search v7 using the Bing Visual Search Nuget Package at https://www.nuget.org/packages/Microsoft.Bing.Search.VisualSearch/.

Getting started

Prerequisites

  • Visual Studio 2017. If required, you can download the free community version.
  • A Bing API key is required to authenticate SDK calls. You can sign up here for the free trial key. This trial key is good for 30 days with 3 calls per second. Or, for production scenarios, you can buy an access key. When buying an access key, consider which tier is appropriate for you.
  • .NET Core SDK (with the ability to run .netcore 1.1 apps). You can get .NET Core, Framework, and Runtime from here: https://www.microsoft.com/net/download/.

Quickstart

To get the Bing Visual Search sample running locally, follow these steps:

  1. Run git clone https://github.com/microsoft/bing-search-sdk-for-net.git.
  2. From Visual Studio 2017, open bing-search-sdk-for-net\samples\BingSearchSamples\BingVisualSearch\Microsoft.Bing.VisualSearch.Samples.sln.
  3. From Tools > Nuget Package Manager > Package Manager Console, run npm install https://www.nuget.org/packages/Microsoft.Bing.Search.VisualSearch/. Or, go to Project > Manage Nuget Packages and search for Microsoft.Bing.VisualSearch under the Browse tab, and then click Install.
  4. From the top menu of Visual Studio, click Microsoft.Bing.VisualSearch.Samples for the debug/release version. This runs examples from the BingVisualSearch\VisualSearchSamples.cs file.

Note:

Change TargetFramework in Microsoft.Bing.VisualSearch.Samples.csproj to netcoreapp1.1 if you have .NET Framework version as 2.1.2.

If you have an older version, change it as follows:

Current

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

Resources