azure.cognitiveservices.search.websearch.models module

exception azure.cognitiveservices.search.websearch.models.ErrorResponseException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘ErrorResponse’.

Parameters
  • deserialize – A deserializer

  • response – Server response to be deserialized.

class azure.cognitiveservices.search.websearch.models.Answer(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Response

Answer.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Computation, SearchResultsAnswer

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

class azure.cognitiveservices.search.websearch.models.Article(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.CreativeWork

Article.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: NewsArticle

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • word_count (int) – The number of words in the text of the Article.

class azure.cognitiveservices.search.websearch.models.Computation(*, expression: str, value: str, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Answer

Defines an expression and its answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • expression (str) – Required. The math or conversion expression. If the query contains a request to convert units of measure (for example, meters to feet), this field contains the from units and value contains the to units. If the query contains a mathematical expression such as 2+2, this field contains the expression and value contains the answer. Note that mathematical expressions may be normalized. For example, if the query was sqrt(4^2+8^2), the normalized expression may be sqrt((4^2)+(8^2)). If the user’s query is a math question and the textDecorations query parameter is set to true, the expression string may include formatting markers. For example, if the user’s query is log(2), the normalized expression includes the subscript markers. For more information, see Hit Highlighting.

  • value (str) – Required. The expression’s answer.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

class azure.cognitiveservices.search.websearch.models.CreativeWork(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Thing

CreativeWork.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: WebPage, MediaObject, Article

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

class azure.cognitiveservices.search.websearch.models.Error(*, message: str, code='None', **kwargs)[source]

Bases: msrest.serialization.Model

Defines the error that occurred.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • code (str or ErrorCode) – Required. The error code that identifies the category of error. Possible values include: ‘None’, ‘ServerError’, ‘InvalidRequest’, ‘RateLimitExceeded’, ‘InvalidAuthorization’, ‘InsufficientAuthorization’. Default value: “None” .

  • message (str) – Required. A description of the error.

Variables
  • sub_code (str or ErrorSubCode) – The error code that further helps to identify the error. Possible values include: ‘UnexpectedError’, ‘ResourceError’, ‘NotImplemented’, ‘ParameterMissing’, ‘ParameterInvalidValue’, ‘HttpNotAllowed’, ‘Blocked’, ‘AuthorizationMissing’, ‘AuthorizationRedundancy’, ‘AuthorizationDisabled’, ‘AuthorizationExpired’

  • more_details (str) – A description that provides additional information about the error.

  • parameter (str) – The parameter in the request that caused the error.

  • value (str) – The parameter’s value in the request that was not valid.

class azure.cognitiveservices.search.websearch.models.ErrorResponse(*, errors, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Response

The top-level response that represents a failed request.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • errors (list[Error]) – Required. A list of errors that describe the reasons why the request failed.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

class azure.cognitiveservices.search.websearch.models.Identifiable(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.ResponseBase

Defines the identity of a resource.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Response

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables

id (str) – A String identifier.

class azure.cognitiveservices.search.websearch.models.ImageObject(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.MediaObject

Defines an image.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).

  • host_page_url (str) – URL of the page that hosts the media object.

  • width (int) – The width of the source media object, in pixels.

  • height (int) – The height of the source media object, in pixels.

  • thumbnail (ImageObject) – The URL to a thumbnail of the image

class azure.cognitiveservices.search.websearch.models.Images(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines an image answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[ImageObject]) – Required. A list of image objects that are relevant to the query. If there are no results, the List is empty.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

  • next_offset (int) –

  • query_expansions (list[Query]) –

  • similar_terms (list[Query]) –

  • related_searches (list[Query]) –

class azure.cognitiveservices.search.websearch.models.Intangible(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Thing

Intangible.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: StructuredValue

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

class azure.cognitiveservices.search.websearch.models.MediaObject(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.CreativeWork

MediaObject.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageObject, VideoObject

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).

  • host_page_url (str) – URL of the page that hosts the media object.

  • width (int) – The width of the source media object, in pixels.

  • height (int) – The height of the source media object, in pixels.

class azure.cognitiveservices.search.websearch.models.News(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines a news answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[NewsArticle]) – Required. An array of NewsArticle objects that contain information about news articles that are relevant to the query. If there are no results to return for the request, the array is empty.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

  • location (str) –

class azure.cognitiveservices.search.websearch.models.NewsArticle(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Article

Defines a news article.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • word_count (int) – The number of words in the text of the Article.

class azure.cognitiveservices.search.websearch.models.Places(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines a local entity answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[Thing]) – Required. A list of local entities, such as restaurants or hotels.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

class azure.cognitiveservices.search.websearch.models.Query(*, text: str, **kwargs)[source]

Bases: msrest.serialization.Model

Defines a search query.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

text (str) – Required. The query string. Use this string as the query term in a new search request.

Variables
  • display_text (str) – The display version of the query term. This version of the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting

  • web_search_url (str) – The URL that takes the user to the Bing search results page for the query.Only related search results include this field.

  • search_link (str) –

  • thumbnail (ImageObject) –

class azure.cognitiveservices.search.websearch.models.QueryContext(*, original_query: str, **kwargs)[source]

Bases: msrest.serialization.Model

Defines the query context that Bing used for the request.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

original_query (str) – Required. The query string as specified in the request.

Variables
  • altered_query (str) – The query string used by Bing to perform the query. Bing uses the altered query string if the original query string contained spelling mistakes. For example, if the query string is “saling downwind”, the altered query string will be “sailing downwind”. This field is included only if the original query string contains a spelling mistake.

  • alteration_override_query (str) – The query string to use to force Bing to use the original string. For example, if the query string is “saling downwind”, the override query string will be “+saling downwind”. Remember to encode the query string which results in “%2Bsaling+downwind”. This field is included only if the original query string contains a spelling mistake.

  • adult_intent (bool) – A Boolean value that indicates whether the specified query has adult intent. The value is true if the query has adult intent; otherwise, false.

  • ask_user_for_location (bool) – A Boolean value that indicates whether Bing requires the user’s location to provide accurate results. If you specified the user’s location by using the X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this field. For location aware queries, such as “today’s weather” or “restaurants near me” that need the user’s location to provide accurate results, this field is set to true. For location aware queries that include the location (for example, “Seattle weather”), this field is set to false. This field is also set to false for queries that are not location aware, such as “best sellers”.

  • is_transactional (bool) –

class azure.cognitiveservices.search.websearch.models.RankingRankingGroup(*, items, **kwargs)[source]

Bases: msrest.serialization.Model

Defines a search results group, such as mainline.

All required parameters must be populated in order to send to Azure.

Parameters

items (list[RankingRankingItem]) – Required. A list of search result items to display in the group.

class azure.cognitiveservices.search.websearch.models.RankingRankingItem(*, answer_type='WebPages', **kwargs)[source]

Bases: msrest.serialization.Model

Defines a search result item to display.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

answer_type (str or AnswerType) – Required. The answer that contains the item to display. Use the type to find the answer in the SearchResponse object. The type is the name of a SearchResponse field. Possible values include: ‘WebPages’, ‘Images’, ‘SpellSuggestions’, ‘News’, ‘RelatedSearches’, ‘Videos’, ‘Computation’, ‘TimeZone’. Default value: “WebPages” .

Variables
  • result_index (int) – A zero-based index of the item in the answer.If the item does not include this field, display all items in the answer. For example, display all news articles in the News answer.

  • value (Identifiable) – The ID that identifies either an answer to display or an item of an answer to display. If the ID identifies an answer, display all items of the answer.

  • html_index (int) –

  • textual_index (int) –

  • screenshot_index (int) –

class azure.cognitiveservices.search.websearch.models.RankingRankingResponse(**kwargs)[source]

Bases: msrest.serialization.Model

Defines where on the search results page content should be placed and in what order.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • pole (RankingRankingGroup) – The search results that should be afforded the most visible treatment (for example, displayed above the mainline and sidebar).

  • mainline (RankingRankingGroup) – The search results to display in the mainline.

  • sidebar (RankingRankingGroup) – The search results to display in the sidebar.

class azure.cognitiveservices.search.websearch.models.RelatedSearchesRelatedSearchAnswer(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines a list of related queries made by others.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[Query]) – Required. A list of related queries that were made by others.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

class azure.cognitiveservices.search.websearch.models.Response(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Identifiable

Defines a response. All schemas that could be returned at the root of a response should inherit from this.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SearchResponse, Thing, Answer, ErrorResponse

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

class azure.cognitiveservices.search.websearch.models.ResponseBase(**kwargs)[source]

Bases: msrest.serialization.Model

ResponseBase.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Identifiable

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

class azure.cognitiveservices.search.websearch.models.SearchResponse(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Response

Defines the top-level object that the response includes when the request succeeds.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • query_context (QueryContext) – An object that contains the query string that Bing used for the request. This object contains the query string as entered by the user. It may also contain an altered query string that Bing used for the query if the query string contained a spelling mistake.

  • web_pages (WebWebAnswer) – A list of webpages that are relevant to the search query.

  • images (Images) – A list of images that are relevant to the search query.

  • news (News) – A list of news articles that are relevant to the search query.

  • related_searches (RelatedSearchesRelatedSearchAnswer) – A list of related queries made by others.

  • spell_suggestions (SpellSuggestions) – The query string that likely represents the user’s intent.

  • time_zone (TimeZone) – The date and time of one or more geographic locations.

  • videos (Videos) – A list of videos that are relevant to the search query.

  • computation (Computation) – The answer to a math expression or units conversion expression.

  • ranking_response (RankingRankingResponse) – The order that Bing suggests that you display the search results in.

class azure.cognitiveservices.search.websearch.models.SearchResultsAnswer(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Answer

SearchResultsAnswer.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: WebWebAnswer, Images, News, RelatedSearchesRelatedSearchAnswer, SpellSuggestions, TimeZone, Videos, Places

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

class azure.cognitiveservices.search.websearch.models.SpellSuggestions(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines a suggested query string that likely represents the user’s intent. The search results include this response if Bing determines that the user may have intended to search for something different. For example, if the user searches for alon brown, Bing may determine that the user likely intended to search for Alton Brown instead (based on past searches by others of Alon Brown).

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[Query]) – Required. A list of suggested query strings that may represent the user’s intention. The list contains only one Query object.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

class azure.cognitiveservices.search.websearch.models.StructuredValue(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Intangible

StructuredValue.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

class azure.cognitiveservices.search.websearch.models.Thing(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.Response

Thing.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: CreativeWork, Intangible

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

class azure.cognitiveservices.search.websearch.models.TimeZone(*, primary_city_time, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines the data and time of one or more geographic locations.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • primary_city_time (TimeZoneTimeZoneInformation) – Required. The data and time, in UTC, of the geographic location specified in the query. If the query specified a specific geographic location (for example, a city), this object contains the name of the geographic location and the current date and time of the location, in UTC. If the query specified a general geographic location, such as a state or country, this object contains the date and time of the primary city or state found in the specified state or country. If the location contains additional time zones, the otherCityTimes field contains the data and time of cities or states located in the other time zones.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

  • other_city_times (list[TimeZoneTimeZoneInformation]) – A list of dates and times of nearby time zones.

class azure.cognitiveservices.search.websearch.models.TimeZoneTimeZoneInformation(*, location: str, time: str, utc_offset: str, **kwargs)[source]

Bases: msrest.serialization.Model

Defines a date and time for a geographical location.

All required parameters must be populated in order to send to Azure.

Parameters
  • location (str) – Required. The name of the geographical location.For example, County; City; City, State; City, State, Country; or Time Zone.

  • time (str) – Required. The data and time specified in the form, YYYY-MM-DDThh;mm:ss.ssssssZ.

  • utc_offset (str) – Required. The offset from UTC. For example, UTC-7.

class azure.cognitiveservices.search.websearch.models.VideoObject(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.MediaObject

Defines a video object that is relevant to the query.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).

  • host_page_url (str) – URL of the page that hosts the media object.

  • width (int) – The width of the source media object, in pixels.

  • height (int) – The height of the source media object, in pixels.

  • motion_thumbnail_url (str) –

  • motion_thumbnail_id (str) –

  • embed_html (str) –

  • allow_https_embed (bool) –

  • view_count (int) –

  • thumbnail (ImageObject) –

  • video_id (str) –

  • allow_mobile_embed (bool) –

  • is_superfresh (bool) –

class azure.cognitiveservices.search.websearch.models.Videos(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines a video answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[VideoObject]) – Required. A list of video objects that are relevant to the query.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

  • next_offset (int) –

  • query_expansions (list[Query]) –

  • related_searches (list[Query]) –

class azure.cognitiveservices.search.websearch.models.WebMetaTag(**kwargs)[source]

Bases: msrest.serialization.Model

Defines a webpage’s metadata.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • name (str) – The metadata.

  • content (str) – The name of the metadata.

class azure.cognitiveservices.search.websearch.models.WebPage(**kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.CreativeWork

Defines a webpage that is relevant to the query.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • display_url (str) – The display URL of the webpage. The URL is meant for display purposes only and is not well formed.

  • snippet (str) – A snippet of text from the webpage that describes its contents.

  • deep_links (list[WebPage]) – A list of links to related content that Bing found in the website that contains this webpage. The Webpage object in this context includes only the name, url, urlPingSuffix, and snippet fields.

  • date_last_crawled (str) – The last time that Bing crawled the webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For example, 2015-04-13T05:23:39.

  • search_tags (list[WebMetaTag]) – A list of search tags that the webpage owner specified on the webpage. The API returns only indexed search tags. The name field of the MetaTag object contains the indexed search tag. Search tags begin with search.* (for example, search.assetId). The content field contains the tag’s value.

  • primary_image_of_page (ImageObject) –

class azure.cognitiveservices.search.websearch.models.WebWebAnswer(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.websearch.models._models_py3.SearchResultsAnswer

Defines a list of relevant webpage links.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[WebPage]) – Required. A list of webpages that are relevant to the query.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • query_context (QueryContext) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

  • some_results_removed (bool) – A Boolean value that indicates whether the response excluded some results from the answer. If Bing excluded some results, the value is true.

class azure.cognitiveservices.search.websearch.models.WebWebGrouping(*, web_pages, **kwargs)[source]

Bases: msrest.serialization.Model

WebWebGrouping.

All required parameters must be populated in order to send to Azure.

Parameters
  • web_pages (list[WebPage]) – Required.

  • _type (str) – Required. Constant filled by server.

class azure.cognitiveservices.search.websearch.models.AnswerType[source]

Bases: str, enum.Enum

An enumeration.

computation = 'Computation'
images = 'Images'
news = 'News'
related_searches = 'RelatedSearches'
spell_suggestions = 'SpellSuggestions'
time_zone = 'TimeZone'
videos = 'Videos'
web_pages = 'WebPages'
class azure.cognitiveservices.search.websearch.models.ErrorCode[source]

Bases: str, enum.Enum

An enumeration.

insufficient_authorization = 'InsufficientAuthorization'
invalid_authorization = 'InvalidAuthorization'
invalid_request = 'InvalidRequest'
none = 'None'
rate_limit_exceeded = 'RateLimitExceeded'
server_error = 'ServerError'
class azure.cognitiveservices.search.websearch.models.ErrorSubCode[source]

Bases: str, enum.Enum

An enumeration.

authorization_disabled = 'AuthorizationDisabled'
authorization_expired = 'AuthorizationExpired'
authorization_missing = 'AuthorizationMissing'
authorization_redundancy = 'AuthorizationRedundancy'
blocked = 'Blocked'
http_not_allowed = 'HttpNotAllowed'
not_implemented = 'NotImplemented'
parameter_invalid_value = 'ParameterInvalidValue'
parameter_missing = 'ParameterMissing'
resource_error = 'ResourceError'
unexpected_error = 'UnexpectedError'
class azure.cognitiveservices.search.websearch.models.Freshness[source]

Bases: str, enum.Enum

An enumeration.

day = 'Day'
month = 'Month'
week = 'Week'
class azure.cognitiveservices.search.websearch.models.SafeSearch[source]

Bases: str, enum.Enum

An enumeration.

moderate = 'Moderate'
off = 'Off'
strict = 'Strict'
class azure.cognitiveservices.search.websearch.models.TextFormat[source]

Bases: str, enum.Enum

An enumeration.

html = 'Html'
raw = 'Raw'