Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Microsoft Web IQ SDKs forniscono client tipizzati per ricerca Auto, Web, notizie, video, immagine e luoghi, Commerce, oltre a Browse. Scegliere una lingua nella parte superiore di questa pagina per cambiare insieme tutti i comandi di installazione e gli esempi.
Questi esempi usano le versioni pubbliche dell'SDK 1.2.1 per la ricerca automatica con evidenze tipizzate e citazioni limitate al risultato. Aggiornare le versioni precedenti degli SDK prima di eseguirle.
| Property | Python | TypeScript | Rust | Java | .NET |
|---|---|---|---|---|---|
| Package | webiq |
@microsoft/webiq |
webiq |
com.microsoft.webiq:webiq |
Microsoft.WebIQ |
| Versione usata | 1.2.1 | 1.2.1 | 1.2.1 | 1.2.1 | 1.2.1 |
| Runtime | Python 3.11+ | Node.js 22.13+ (22.x) o 24+ | Rust 1.88+ | Java 11+ | .NET 8+ |
| License | MIT | MIT | MIT | MIT | MIT |
È necessaria una chiave API di Web IQ o un'identità Microsoft Entra con accesso a Web IQ. Vedere Autenticazione.
Installation
python -m pip install webiq==1.2.1
npm install @microsoft/webiq@1.2.1
Aggiungere l'SDK e il runtime Tokio al progetto:
cargo add webiq@1.2.1
cargo add tokio --features macros,rt-multi-thread
Aggiungere la dipendenza Maven Central al pom.xml del progetto. Configurare il progetto per la compilazione con Java 11 o versione successiva.
<dependency>
<groupId>com.microsoft.webiq</groupId>
<artifactId>webiq</artifactId>
<version>1.2.1</version>
</dependency>
Con Gradle:
implementation "com.microsoft.webiq:webiq:1.2.1"
Questi esempi usano il pacchetto pubblico Microsoft.WebIQ 1.2.1 e richiedono .NET 8 o versione successiva. Eseguire questo comando in un progetto console di .NET:
dotnet add package Microsoft.WebIQ --version 1.2.1
Quickstart
Impostare la variabile di ambiente WEBIQ_API_KEY sulla chiave API prima di eseguire l'esempio. Non inserire chiavi API nel codice sorgente.
L'esempio chiama Auto in advanced modalità con timeout di 60 secondi per tentativo, stampa ogni risultato dell'evidenza con le citazioni di supporto, quindi chiama Web, News, Video, Image e Places Search e recupera una pagina con Browse. Auto restituisce prove, non una risposta finale generata. Vedere il riferimento Auto per i tipi di evidenza e le opzioni di richiesta.
I passaggi di richiesta di Web, Notizie e Sfoglia sono il formato consigliato per il grounding. Sfoglia richiede anche una selezione non vuota query di massimo 1000 caratteri. Per i formati di documenti completi, vedere Formati di contenuto.
import os
from webiq import WebIQClient
from webiq.types import BrowseContentFormat, ContentFormat, AutoMode
with WebIQClient(api_key=os.environ["WEBIQ_API_KEY"]) as client:
evidence = client.auto.search(
"What are the latest developments in retrieval-augmented generation?",
mode=AutoMode.advanced,
max_response_length=30000,
max_citations=5,
timeout=60.0,
)
for result in evidence.results or []:
print(result.evidence)
for citation in result.citations or []:
print(citation.title, citation.url)
web = client.web.search(
"Microsoft Web IQ",
max_results=5,
content_format=ContentFormat.passage,
)
for result in web.webResults or []:
print(result.title, result.url)
news = client.news.search(
"technology",
max_results=5,
content_format=ContentFormat.passage,
)
for item in news.newsResults or []:
print(item.title, item.source)
videos = client.videos.search("machine learning tutorial", max_results=5)
for video in videos.videoResults or []:
print(video.title, video.length)
images = client.images.search("golden gate bridge", max_results=5)
for image in images.imageResults or []:
print(image.title, image.url)
places = client.places.search(
"coffee in Seattle",
max_results=5,
language="en",
region="US",
location="lat:47.6062;long:-122.3321",
)
for place in places.placeResults or []:
print(place.name, place.businessUrl)
page = client.browse.fetch(
"https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283",
query="How fast is Web IQ",
content_format=BrowseContentFormat.passage,
max_length=3000,
live_crawl="fallback",
)
print(page.content)
import { WebIQClient, BrowseContentFormat, ContentFormat, LiveCrawlMode, AutoMode } from '@microsoft/webiq';
async function main() {
const apiKey = process.env.WEBIQ_API_KEY;
if (!apiKey) throw new Error('Set WEBIQ_API_KEY before running this example.');
const client = new WebIQClient({ apiKey });
try {
const evidence = await client.auto.search(
'What are the latest developments in retrieval-augmented generation?',
{ mode: AutoMode.ADVANCED, maxResponseLength: 30000, maxCitations: 5, timeout: 60_000 },
);
for (const result of evidence.results ?? []) {
console.log(result.evidence);
for (const citation of result.citations ?? []) console.log(citation.title, citation.url);
}
const web = await client.web.search('Microsoft Web IQ', {
maxResults: 5,
contentFormat: ContentFormat.PASSAGE,
});
for (const result of web.webResults ?? []) console.log(result.title, result.url);
const news = await client.news.search('technology', {
maxResults: 5,
contentFormat: ContentFormat.PASSAGE,
});
for (const item of news.newsResults ?? []) console.log(item.title, item.source);
const videos = await client.videos.search('machine learning tutorial', { maxResults: 5 });
for (const video of videos.videoResults ?? []) console.log(video.title, video.length);
const images = await client.images.search('golden gate bridge', { maxResults: 5 });
for (const image of images.imageResults ?? []) console.log(image.title, image.url);
const places = await client.places.search('coffee in Seattle', {
maxResults: 5,
language: 'en',
region: 'US',
location: 'lat:47.6062;long:-122.3321',
});
for (const place of places.placeResults ?? []) console.log(place.name, place.businessUrl);
const page = await client.browse.fetch('https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283', {
query: 'How fast is Web IQ',
contentFormat: BrowseContentFormat.PASSAGE,
maxLength: 3000,
liveCrawl: LiveCrawlMode.FALLBACK,
});
console.log(page.content);
} finally {
await client.close();
}
}
main().catch(console.error);
use webiq::{
AutoSearchOptions, BrowseContentFormat, BrowseOptions, ContentFormat, ImageSearchOptions,
LiveCrawlMode, NewsSearchOptions, PlacesSearchOptions, VideoSearchOptions,
AutoMode, WebIqClient, WebSearchOptions,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = WebIqClient::new(std::env::var("WEBIQ_API_KEY")?)?;
let evidence = client.auto().search(
"What are the latest developments in retrieval-augmented generation?",
AutoSearchOptions::new()
.mode(AutoMode::Advanced)
.max_response_length(30000)
.max_citations(5)
.timeout(std::time::Duration::from_secs(60)),
).await?;
for result in evidence.results.unwrap_or_default() {
println!("{:?}", result.evidence);
for citation in result.citations.unwrap_or_default() {
println!("{:?} {:?}", citation.title, citation.url);
}
}
let web = client.web().search(
"Microsoft Web IQ",
WebSearchOptions::new()
.max_results(5)
.content_format(ContentFormat::Passage),
).await?;
for result in web.web_results.unwrap_or_default() {
println!("{:?} {:?}", result.title, result.url);
}
let news = client.news().search(
"technology",
NewsSearchOptions::new()
.max_results(5)
.content_format(ContentFormat::Passage),
).await?;
for item in news.news_results.unwrap_or_default() {
println!("{:?} {:?}", item.title, item.source);
}
let videos = client.videos().search(
"machine learning tutorial",
VideoSearchOptions::new().max_results(5),
).await?;
for video in videos.video_results.unwrap_or_default() {
println!("{:?} {:?}", video.title, video.length);
}
let images = client.images().search(
"golden gate bridge",
ImageSearchOptions::new().max_results(5),
).await?;
for image in images.image_results.unwrap_or_default() {
println!("{:?} {:?}", image.title, image.url);
}
let places = client.places().search(
"coffee in Seattle",
PlacesSearchOptions::new()
.max_results(5)
.language("en")
.region("US")
.location("lat:47.6062;long:-122.3321"),
).await?;
for place in places.place_results.unwrap_or_default() {
println!("{:?} {:?}", place.name, place.business_url);
}
let page = client.browse().fetch(
"https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283",
BrowseOptions::new()
.query("How fast is Web IQ")
.content_format(BrowseContentFormat::Passage)
.max_length(3000)
.live_crawl(LiveCrawlMode::Fallback),
).await?;
println!("{}", page.content.unwrap_or_default());
Ok(())
}
Salvare questo esempio come src/main/java/WebIqSample.java nel progetto Maven ed eseguire mvn compile exec:java -Dexec.mainClass=WebIqSample.
import com.microsoft.webiq.WebIQClient;
import com.microsoft.webiq.models.*;
import com.microsoft.webiq.resources.*;
public class WebIqSample {
public static void main(String[] args) {
try (WebIQClient client = WebIQClient.withApiKey(System.getenv("WEBIQ_API_KEY"))) {
SearchAutoEvidenceResponse evidence = client.auto.search(
"What are the latest developments in retrieval-augmented generation?",
AutoSearchOptions.builder().mode(AutoMode.ADVANCED)
.maxResponseLength(30000).maxCitations(5)
.timeout(java.time.Duration.ofSeconds(60)).build());
if (evidence.getResults() != null) {
for (AutoEvidenceResult result : evidence.getResults()) {
System.out.println(result.getEvidence());
if (result.getCitations() != null) {
for (AutoEvidenceCitation citation : result.getCitations()) {
System.out.println(citation.getTitle() + " " + citation.getUrl());
}
}
}
}
WebResponse web = client.web.search("Microsoft Web IQ",
WebSearchOptions.builder().maxResults(5)
.contentFormat(ContentFormat.PASSAGE).build());
if (web.getWebResults() != null) {
for (WebResult result : web.getWebResults()) {
System.out.println(result.getTitle() + " " + result.getUrl());
}
}
NewsResponse news = client.news.search("technology",
NewsSearchOptions.builder().maxResults(5)
.contentFormat(ContentFormat.PASSAGE).build());
if (news.getNewsResults() != null) {
for (NewsItem item : news.getNewsResults()) {
System.out.println(item.getTitle() + " " + item.getSource());
}
}
VideosResponse videos = client.videos.search("machine learning tutorial",
VideosSearchOptions.builder().maxResults(5).build());
if (videos.getVideoResults() != null) {
for (VideoItem video : videos.getVideoResults()) {
System.out.println(video.getTitle() + " " + video.getLength());
}
}
ImagesResponse images = client.images.search("golden gate bridge",
ImagesSearchOptions.builder().maxResults(5).build());
if (images.getImageResults() != null) {
for (ImageItem image : images.getImageResults()) {
System.out.println(image.getTitle() + " " + image.getUrl());
}
}
PlacesResponse places = client.places.search("coffee in Seattle",
PlacesSearchOptions.builder().maxResults(5)
.language("en").region("US")
.location("lat:47.6062;long:-122.3321").build());
if (places.getPlaceResults() != null) {
for (PlaceItem place : places.getPlaceResults()) {
System.out.println(place.getName() + " " + place.getBusinessUrl());
}
}
BrowseResponse page = client.browse.fetch("https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283",
BrowseFetchOptions.builder()
.query("How fast is Web IQ")
.contentFormat(BrowseContentFormat.PASSAGE)
.maxLength(3000).liveCrawl(LiveCrawlMode.FALLBACK).build());
System.out.println(page.getContent());
}
}
}
using Microsoft.WebIQ;
using Microsoft.WebIQ.Models;
using System.Text.Json;
string apiKey = Environment.GetEnvironmentVariable("WEBIQ_API_KEY")
?? throw new InvalidOperationException("Set WEBIQ_API_KEY before running this example.");
using var client = new WebIQClient(apiKey);
var evidence = await client.Auto.SearchAsync(
"What are the latest developments in retrieval-augmented generation?",
request =>
{
request.Mode = AutoMode.Advanced;
request.MaxResponseLength = 30000;
request.MaxCitations = 5;
}, timeout: TimeSpan.FromSeconds(60));
foreach (var result in evidence.Results ?? [])
{
Console.WriteLine(JsonSerializer.Serialize(result.Evidence));
foreach (var citation in result.Citations ?? [])
Console.WriteLine($"{citation.Title} {citation.Url}");
}
var web = await client.Web.SearchAsync("Microsoft Web IQ", request =>
{
request.MaxResults = 5;
request.ContentFormat = ContentFormat.Passage;
});
foreach (var result in web.WebResults ?? [])
Console.WriteLine($"{result.Title} {result.Url}");
var news = await client.News.SearchAsync("technology", request =>
{
request.MaxResults = 5;
request.ContentFormat = ContentFormat.Passage;
});
foreach (var item in news.NewsResults ?? [])
Console.WriteLine($"{item.Title} {item.Source}");
var videos = await client.Videos.SearchAsync("machine learning tutorial",
request => request.MaxResults = 5);
foreach (var video in videos.VideoResults ?? [])
Console.WriteLine($"{video.Title} {video.Length}");
var images = await client.Images.SearchAsync("golden gate bridge",
request => request.MaxResults = 5);
foreach (var image in images.ImageResults ?? [])
Console.WriteLine($"{image.Title} {image.Url}");
var places = await client.Places.SearchAsync("coffee in Seattle", request =>
{
request.MaxResults = 5;
request.Language = "en";
request.Region = "US";
request.Location = "lat:47.6062;long:-122.3321";
});
foreach (var place in places.PlaceResults ?? [])
Console.WriteLine($"{place.Name} {place.BusinessUrl}");
var page = await client.Browse.FetchAsync("https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283",
request =>
{
request.ContentFormat = BrowseContentFormat.Passage;
request.Query = "How fast is Web IQ";
request.MaxLength = 3000;
request.LiveCrawl = LiveCrawlMode.Fallback;
});
Console.WriteLine(page.Content);
Autenticazione tramite Microsoft Entra ID
Anziché una chiave API, passare una credenziale di identità Azure. Per lo sviluppo locale, accedere con uno strumento di sviluppo supportato, ad esempio il interfaccia della riga di comando di Azure. Per le applicazioni ospitate Azure, usare l'identità gestita o l'identità del carico di lavoro. L'identità deve avere accesso a Web IQ.
L'ambito OAuth predefinito è https://api.microsoft.ai/.default.
Installare la dipendenza di autenticazione facoltativa:
python -m pip install "webiq[entra]==1.2.1"
from azure.identity import DefaultAzureCredential
from webiq import WebIQClient
with DefaultAzureCredential() as credential:
with WebIQClient(credential=credential) as client:
response = client.web.search("Microsoft Web IQ")
print(response.webResults)
npm install "@azure/identity@>=4.13.1"
import { DefaultAzureCredential } from '@azure/identity';
import { WebIQClient } from '@microsoft/webiq';
const client = new WebIQClient({ credential: new DefaultAzureCredential() });
try {
const response = await client.web.search('Microsoft Web IQ');
console.log(response.webResults);
} finally {
await client.close();
}
Il supporto per Azure Identity è incluso nell'SDK. L’SDK riesporta azure_identity, quindi non è necessaria alcuna dipendenza aggiuntiva. In questo esempio viene usata una credenziale per sviluppatori dopo az login o azd auth login:
use webiq::{azure_identity::DeveloperToolsCredential, WebIqClient};
let credential = DeveloperToolsCredential::new(None)?;
let client = WebIqClient::builder()
.credential(credential)
.build()?;
let response = client.web().search("Microsoft Web IQ", Default::default()).await?;
println!("{:?}", response.web_results);
Per le applicazioni ospitate, scegliere ManagedIdentityCredential o WorkloadIdentityCredential da webiq::azure_identity.
Aggiungere com.azure:azure-identity alle dipendenze Maven o Gradle usando una versione compatibile con le dipendenze Azure SDK del progetto.
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.microsoft.webiq.WebIQClient;
import com.microsoft.webiq.WebIQClientOptions;
WebIQClientOptions options = WebIQClientOptions.builder()
.credential(new DefaultAzureCredentialBuilder().build())
.build();
try (WebIQClient client = new WebIQClient(options)) {
System.out.println(client.web.search("Microsoft Web IQ").getWebResults());
}
dotnet add package Azure.Identity
using Azure.Identity;
using Microsoft.WebIQ;
using var client = new WebIQClient(new WebIQClientOptions
{
Credential = new DefaultAzureCredential()
});
var response = await client.Web.SearchAsync("Microsoft Web IQ");
Console.WriteLine(response.WebResults?.Count);
Risorse e opzioni di richiesta
Usare il riferimento REST per le descrizioni dei parametri, i valori supportati, i campi di risposta e i limiti del servizio.
| risorsa | Metodo | Reference |
|---|---|---|
| Auto | client.auto.search(query, ...) |
Auto |
| Web | client.web.search(query, ...) |
Ricerca Web |
| Notizie | client.news.search(query, ...) |
Ricerca News |
| Videos | client.videos.search(query, ...) |
Ricerca video |
| Immagini | client.images.search(query, ...) |
Ricerca immagini |
| Places | client.places.search(query, ...) |
Luoghi |
| Esplora | client.browse.fetch(url, ...) |
Sfoglia |
| Ricerca Commerce | client.commerce.search(query, ...) |
Commercio |
| Offerte commerciali | client.commerce.fetch_offers(...) |
Commercio |
| Dettagli prodotto Commerce | client.commerce.fetch_details(...) |
Commercio |
Le opzioni di richiesta usano snake_case; le proprietà di risposta usano camelCase. Usare le enumerazioni SDK per i valori supportati. Ad esempio:
from webiq.types import ContentFormat, ImageAspectRatio, ImageSize, SafeSearch
web = client.web.search(
"search terms",
max_results=10,
language="en",
region="US",
location="lat:40.7;long:-74.0",
content_format=ContentFormat.passage,
max_length=3000,
)
news = client.news.search(
"search terms",
max_results=10,
content_format=ContentFormat.passage,
max_length=3000,
)
videos = client.videos.search(
"search terms", max_results=5, enable_playlist=True, freshness="month",
)
images = client.images.search(
"search terms",
max_results=5,
aspect_ratio=ImageAspectRatio.wide,
image_size=ImageSize.large,
safe_search=SafeSearch.strict,
watermark_free=True,
)
I frammenti rimanenti presuppongono che client sia aperto, a meno che non ne costruiscano uno in modo esplicito.
| risorsa | Metodo | Reference |
|---|---|---|
| Auto | client.auto.search(query, options) |
Auto |
| Web | client.web.search(query, options) |
Ricerca Web |
| Notizie | client.news.search(query, options) |
Ricerca News |
| Videos | client.videos.search(query, options) |
Ricerca video |
| Immagini | client.images.search(query, options) |
Ricerca immagini |
| Places | client.places.search(query, options) |
Luoghi |
| Esplora | client.browse.fetch(url, options) |
Sfoglia |
| Commerce Search | client.commerce.search(query, options) |
Commercio |
| Offerte commerciali | client.commerce.fetchOffers(options) |
Commercio |
| Dettagli prodotto Commerce | client.commerce.fetchDetails(options) |
Commercio |
Le opzioni di richiesta e le proprietà di risposta usano camelCase, ad esempio maxResults, contentFormat, liveCrawl, e aspectRatio. Passare le opzioni come secondo argomento. Usare le enumerazioni SDK per i valori supportati, come illustrato nella guida introduttiva.
I frammenti rimanenti presuppongono un client aperto e vengono eseguiti all'interno di una funzione asincrona, a meno che non costruiscano un client in modo esplicito. L'await di primo livello richiede un modulo ES.
| risorsa | Metodo | Reference |
|---|---|---|
| Auto | client.auto().search(query, options) |
Auto |
| Web | client.web().search(query, options) |
Ricerca Web |
| Notizie | client.news().search(query, options) |
Ricerca News |
| Videos | client.videos().search(query, options) |
Ricerca video |
| Immagini | client.images().search(query, options) |
Ricerca immagini |
| Places | client.places().search(query, options) |
Luoghi |
| Esplora | client.browse().fetch(url, options) |
Sfoglia |
| Ricerca Commerce | client.commerce().search(query, options) |
Commercio |
| Offerte commerciali | client.commerce().fetch_offers(options) |
Commercio |
| Dettagli del prodotto Commerce | client.commerce().fetch_details(options) |
Commercio |
Opzioni di compilazione con AutoSearchOptions, NewsSearchOptions, WebSearchOptions, VideoSearchOptions, ImageSearchOptions, PlacesSearchOptions, BrowseOptions, CommerceSearchOptions, CommerceOffersOptions o CommerceDetailsOptions. I campi di risposta usano snake_case e i valori facoltativi usano Option.
I frammenti rimanenti vengono eseguiti all'interno di una funzione asincrona che restituisce Result, con un oggetto aperto client , a meno che non costruiscano uno in modo esplicito. Usare l'installazione del runtime Tokio dalla guida rapida.
| risorsa | Metodo | Reference |
|---|---|---|
| Auto | client.auto.search(query, AutoSearchOptions) |
Auto |
| Web | client.web.search(query, WebSearchOptions) |
Ricerca Web |
| Notizie | client.news.search(query, NewsSearchOptions) |
Ricerca News |
| Videos | client.videos.search(query, VideosSearchOptions) |
Ricerca video |
| Immagini | client.images.search(query, ImagesSearchOptions) |
Ricerca immagini |
| Places | client.places.search(query, PlacesSearchOptions) |
Luoghi |
| Esplora | client.browse.fetch(url, BrowseFetchOptions) |
Sfoglia |
| Ricerca Commerce | client.commerce.search(query, CommerceSearchOptions) |
Commercio |
| Offerte commerciali | client.commerce.fetchOffers(CommerceOffersOptions) |
Commercio |
| Dettagli prodotto Commerce | client.commerce.fetchDetails(CommerceDetailsOptions) |
Commercio |
Crea opzioni di richiesta con metodi builder camelCase, ad esempio maxResults, contentFormat e maxLength. Leggere le proprietà della risposta tramite getter quali getWebResults() e getTraceId(). I campi di risposta facoltativi possono essere null.
I frammenti rimanenti vengono eseguiti all'interno di un metodo, con un client aperto, a meno che non ne costruiscano uno in modo esplicito. Posizionare le importazioni nella parte superiore del file Java.
| risorsa | Metodo asincrono | Reference |
|---|---|---|
| Auto | client.Auto.SearchAsync(query, configure) |
Auto |
| Web | client.Web.SearchAsync(query, configure) |
Ricerca Web |
| Notizie | client.News.SearchAsync(query, configure) |
Ricerca News |
| Videos | client.Videos.SearchAsync(query, configure) |
Ricerca video |
| Immagini | client.Images.SearchAsync(query, configure) |
Ricerca immagini |
| Places | client.Places.SearchAsync(query, configure) |
Luoghi |
| Esplora | client.Browse.FetchAsync(url, configure) |
Sfoglia |
| Commerce Search | client.Commerce.SearchAsync(query, configure) |
Commercio |
| Offerte commerciali | client.Commerce.FetchOffersAsync(...) |
Commercio |
| Dettagli del prodotto Commerce | client.Commerce.FetchDetailsAsync(...) |
Commercio |
Le proprietà di richiesta e risposta usano PascalCase. Impostare le opzioni di richiesta nel callback di configurazione o passare direttamente un modello di richiesta. Sono disponibili anche i metodi sincroni Fetch e Search.
I frammenti rimanenti presuppongono che client sia aperto, a meno che non ne costruiscano uno in modo esplicito.
Disponibilità di Auto
Auto è disponibile in tutti e cinque gli SDK alla versione 1.2.1. Python e Java esporre Auto tramite i client sincroni e asincroni; .NET fornisce Search e SearchAsync; TypeScript e Rust usano chiamate asincrone.
Scrivere una domanda completa in linguaggio naturale e mantenere i vincoli importanti per l'applicazione. Leggere ogni risultato evidence insieme al relativo citations; le citazioni supportano solo il risultato che le contiene. Per i parametri, i tipi di evidenza e i limiti del servizio, vedere il riferimento dell'API Auto.
Commerce
Note
Le API Commerce sono in anteprima privata e sono incluse in AppID con accesso completo ai documenti. L'accesso viene abilitato separatamente per Ricerca, Offerte e Dettagli prodotto. Vedi Creare un'esperienza di acquisto con le API commerce.
Cerca i prodotti, quindi recupera le offerte e i dettagli del prodotto per un prodotto trovato. Quando si visualizza un'offerta, collegarla al suo clickUrl esattamente come restituito; vedere Collega alle offerte.
response = client.commerce.search(
"wireless headphones",
max_results=5, # 1-50, default 10
language="en",
region="US",
)
for product in response.products or []:
if product.id:
offer_id = product.offers[0].id if product.offers else None
offers = client.commerce.fetch_offers(
product_id=product.id, sku_id=product.skuId, offer_id=offer_id)
details = client.commerce.fetch_details(
product_id=product.id, sku_id=product.skuId)
for offer in offers.offers or []:
print(offer.name, offer.price, offer.clickUrl)
for detail in details.products or []:
print(detail.name, detail.description, detail.rating)
fetch_offers richiede almeno uno di product_id, sku_ido offer_id.
fetch_details richiede un product_id o sku_id non composto da soli spazi e restituisce zero o un prodotto, non un batch. Entrambe accettano anche language, region e timeout; le offerte accettano anche location. Gli stessi metodi sono disponibili con await in WebIQAsyncClient.
const response = await client.commerce.search('wireless headphones', {
maxResults: 5, // 1-50, default 10
language: 'en',
region: 'US',
});
for (const product of response.products ?? []) {
if (product.id?.trim()) {
const offers = await client.commerce.fetchOffers({
productId: product.id,
skuId: product.skuId,
offerId: product.offers?.[0]?.id,
});
const details = await client.commerce.fetchDetails({
productId: product.id,
skuId: product.skuId,
});
console.log(offers.offers, details.products);
}
}
fetchOffers richiede almeno uno di productId, skuIdo offerId.
fetchDetails richiede un productId o skuId che non contenga solo spazi e restituisce zero o un prodotto, non un batch. Entrambe accettano language, region, e timeout, e signal; le offerte accettano anche location. Gli identificatori e le raccolte di ricerca sono facoltativi.
use webiq::{CommerceDetailsOptions, CommerceOffersOptions, CommerceSearchOptions};
let response = client.commerce().search("wireless headphones",
CommerceSearchOptions::new().max_results(5).language("en").region("US")).await?;
for product in response.products.unwrap_or_default() {
if let Some(id) = product.id.filter(|id| !id.trim().is_empty()) {
let mut offers_options = CommerceOffersOptions::new().product_id(id.clone());
let mut details_options = CommerceDetailsOptions::new().product_id(id);
if let Some(sku_id) = product.sku_id {
offers_options = offers_options.sku_id(sku_id.clone());
details_options = details_options.sku_id(sku_id);
}
if let Some(offer_id) = product.offers.unwrap_or_default().into_iter().next().and_then(|o| o.id) {
offers_options = offers_options.offer_id(offer_id);
}
let offers = client.commerce().fetch_offers(offers_options).await?;
let details = client.commerce().fetch_details(details_options).await?;
println!("{:?} {:?}", offers.offers, details.products);
}
}
fetch_offers richiede almeno uno di product_id, sku_ido offer_id.
fetch_details richiede product_id o sku_id non composto solo da spazi e restituisce zero o un prodotto, non un batch. Entrambi i generatori di opzioni accettano language, region e timeout; le offerte accettano anche location. Gli identificatori e le raccolte di ricerca sono facoltativi.
CommerceResponse response = client.commerce.search("wireless headphones",
CommerceSearchOptions.builder().maxResults(5).language("en").region("US").build());
if (response.getProducts() != null) {
for (var product : response.getProducts()) {
if (product.getId() != null && !product.getId().isBlank()) {
String offerId = product.getOffers() != null && !product.getOffers().isEmpty()
? product.getOffers().get(0).getId() : null;
CommerceOffersResponse offers = client.commerce.fetchOffers(
CommerceOffersOptions.builder().productId(product.getId())
.skuId(product.getSkuId()).offerId(offerId).build());
CommerceProductDetailsResponse details = client.commerce.fetchDetails(
CommerceDetailsOptions.builder().productId(product.getId())
.skuId(product.getSkuId()).build());
System.out.println(offers.getOffers());
System.out.println(details.getProducts());
}
}
}
fetchOffers richiede almeno uno di productId, skuIdo offerId.
fetchDetails richiede productId o skuId che non contenga solo spazi e restituisce zero o un prodotto, non un batch. Entrambi i builder di opzioni accettano language, region e timeout; anche le offerte accettano location. Gli identificatori e le raccolte di ricerca sono facoltativi.
CommerceResponse response = await client.Commerce.SearchAsync("wireless headphones",
request => request.MaxResults = 5);
foreach (var product in response.Products ?? [])
{
if (!string.IsNullOrWhiteSpace(product.Id))
{
var offers = await client.Commerce.FetchOffersAsync(productId: product.Id,
skuId: product.SkuId, offerId: product.Offers?.FirstOrDefault()?.Id);
var details = await client.Commerce.FetchDetailsAsync(productId: product.Id,
skuId: product.SkuId);
Console.WriteLine($"{offers.Offers?.Count} offers, {details.Products?.Count} products");
}
}
FetchOffers e FetchOffersAsync richiedono almeno uno di productId, skuIdo offerId.
FetchDetails e FetchDetailsAsync richiedono un productId o skuId non composto solo da spazi e restituiscono zero o un prodotto, non un batch. Entrambi accettano un callback configure per Language e Region, più i parametri di timeout e annullamento; supportano anche Location. Gli identificatori e le raccolte di ricerca sono facoltativi.
Ambiti
Ricerca Web e Notizie accettano il nome di un ambito creato per filtrare i risultati usando le regole di inclusione ed esclusione di tale ambito. Sostituire your-scope-name con il nome dell'ambito. Per la configurazione e il comportamento, vedere Filtrare i risultati con Scopes.
response = client.web.search(
"Microsoft cloud services",
scope_name="your-scope-name",
)
const response = await client.web.search('Microsoft cloud services', {
scopeName: 'your-scope-name',
});
use webiq::WebSearchOptions;
let response = client.web().search("Microsoft cloud services",
WebSearchOptions::new().scope_name("your-scope-name")).await?;
WebResponse response = client.web.search("Microsoft cloud services",
WebSearchOptions.builder().scopeName("your-scope-name").build());
WebResponse response = await client.Web.SearchAsync("Microsoft cloud services",
request => request.ScopeName = "your-scope-name");
Supporto asincrono
Esegui richieste indipendenti contemporaneamente quando l'applicazione necessita di più tipi di risultati.
Usare WebIQAsyncClient con asyncio:
import asyncio
import os
from webiq import WebIQAsyncClient
async def main():
async with WebIQAsyncClient(api_key=os.environ["WEBIQ_API_KEY"]) as client:
web, news = await asyncio.gather(
client.web.search("Microsoft Web IQ"),
client.news.search("technology"),
)
print(web.webResults, news.newsResults)
asyncio.run(main())
const [web, news] = await Promise.all([
client.web.search('Microsoft Web IQ'),
client.news.search('technology'),
]);
console.log(web.webResults, news.newsResults);
let web_resource = client.web();
let news_resource = client.news();
let (web, news) = tokio::try_join!(
web_resource.search("Microsoft Web IQ", Default::default()),
news_resource.search("technology", Default::default()),
)?;
println!("{:?} {:?}", web.web_results, news.news_results);
Usare WebIQAsyncClient; i relativi metodi di risorsa restituiscono CompletableFuture:
import com.microsoft.webiq.WebIQAsyncClient;
import com.microsoft.webiq.models.NewsResponse;
import com.microsoft.webiq.models.WebResponse;
import java.util.concurrent.CompletableFuture;
try (WebIQAsyncClient client = WebIQAsyncClient.withApiKey(System.getenv("WEBIQ_API_KEY"))) {
CompletableFuture<WebResponse> web = client.web.search("Microsoft Web IQ");
CompletableFuture<NewsResponse> news = client.news.search("technology");
CompletableFuture.allOf(web, news).join();
System.out.println(web.join().getWebResults());
System.out.println(news.join().getNewsResults());
}
var webTask = client.Web.SearchAsync("Microsoft Web IQ");
var newsTask = client.News.SearchAsync("technology");
await Task.WhenAll(webTask, newsTask);
Console.WriteLine((await webTask).WebResults?.Count);
Console.WriteLine((await newsTask).NewsResults?.Count);
Configuration
Timeout e retry
Impostare un timeout a livello di client, quindi eseguirne l'override per ogni richiesta quando necessario. I timeout si applicano per tentativo, non al tempo totale impiegato per riprovare.
Per impostazione predefinita, gli SDK ritentano in caso di errori di rete temporanei e HTTP 408, 500, 502, 520, 523, e 524 fino a due volte, con backoff esponenziale e jitter. Un valore valido retryAfter nel corpo della risposta ha la precedenza sul backoff generato. HTTP 429 e 430 non vengono mai ritentati automaticamente: esaminare le indicazioni per i tentativi dell'errore e applicare il proprio backoff. I timeout sul lato client non vengono ritentati.
import os
from webiq import WebIQClient, RetryPolicy
with WebIQClient(
api_key=os.environ["WEBIQ_API_KEY"],
timeout=10.0,
retry=RetryPolicy(max_retries=2, base_delay_s=0.25, max_delay_s=4.0),
) as client:
response = client.web.search("Microsoft Web IQ", timeout=30.0)
I timeout sono in secondi. Il valore predefinito del client è 10 secondi.
import { WebIQClient, RetryPolicy } from '@microsoft/webiq';
const client = new WebIQClient({
apiKey: process.env.WEBIQ_API_KEY,
timeout: 10_000,
retry: new RetryPolicy({
maxRetries: 2,
baseDelaySeconds: 0.25,
maxDelaySeconds: 4.0,
}),
});
try {
const response = await client.web.search('Microsoft Web IQ', { timeout: 30_000 });
console.log(response.webResults);
} finally {
await client.close();
}
I timeout sono in millisecondi. Il valore predefinito del client è 10.000 millisecondi.
use std::time::Duration;
use webiq::{RetryPolicy, WebIqClient, WebSearchOptions};
let client = WebIqClient::builder()
.api_key(std::env::var("WEBIQ_API_KEY")?)
.timeout(Duration::from_secs(10))
.retry(RetryPolicy::new().max_retries(2))
.build()?;
let response = client.web().search(
"Microsoft Web IQ",
WebSearchOptions::new().timeout(Duration::from_secs(30)),
).await?;
Il valore predefinito del client è 10 secondi.
import com.microsoft.webiq.WebIQClient;
import com.microsoft.webiq.WebIQClientOptions;
import com.microsoft.webiq.resources.WebSearchOptions;
import com.microsoft.webiq.retry.RetryPolicy;
import java.time.Duration;
WebIQClientOptions options = WebIQClientOptions.builder()
.apiKey(System.getenv("WEBIQ_API_KEY"))
.timeout(Duration.ofSeconds(10))
.retry(RetryPolicy.builder().maxRetries(2).build())
.build();
try (WebIQClient client = new WebIQClient(options)) {
client.web.search("Microsoft Web IQ",
WebSearchOptions.builder().timeout(Duration.ofSeconds(30)).build());
}
Il valore predefinito del client è 10 secondi.
using Microsoft.WebIQ;
using var client = new WebIQClient(new WebIQClientOptions
{
ApiKey = Environment.GetEnvironmentVariable("WEBIQ_API_KEY"),
Timeout = TimeSpan.FromSeconds(30),
Retry = new RetryPolicy { MaxRetries = 2 }
});
var response = await client.Web.SearchAsync("Microsoft Web IQ",
timeout: TimeSpan.FromSeconds(10));
Il valore predefinito del client è 30 secondi.
client HTTP personalizzati
Usare un client HTTP personalizzato per la configurazione proxy, TLS o pool di connessioni. Non disabilitare la verifica del certificato.
Passare http_client e chiudere manualmente il client HTTP di proprietà del chiamante. Usare httpx.AsyncClient con WebIQAsyncClient per le richieste asincrone.
import os
import httpx
from webiq import WebIQClient
with httpx.Client(
base_url="https://api.microsoft.ai/v3",
proxy="http://proxy:8080",
) as http_client:
with WebIQClient(
api_key=os.environ["WEBIQ_API_KEY"],
http_client=http_client,
) as client:
response = client.web.search("Microsoft Web IQ")
Installare undici per il supporto proxy:
npm install undici
Passare un fetchFn personalizzato. Mantieni init in modo che le intestazioni, il corpo e il AbortSignal interno dell’SDK vengano inoltrate.
import { ProxyAgent } from 'undici';
import { WebIQClient } from '@microsoft/webiq';
const proxyAgent = new ProxyAgent('http://proxy:8080');
const client = new WebIQClient({
apiKey: process.env.WEBIQ_API_KEY,
fetchFn: (url, init) => {
const options = { ...init, dispatcher: proxyAgent };
return fetch(url, options);
},
});
try {
const response = await client.web.search('Microsoft Web IQ');
console.log(response.webResults);
} finally {
await client.close();
await proxyAgent.close();
}
Passare un oggetto configurato reqwest::Client a WebIqClient::builder().http_client(...). Se l'applicazione crea direttamente questo client, aggiungi reqwest come dipendenza diretta con una versione compatibile con l’SDK.
Passare java.net.http.HttpClient configurato tramite WebIQClientOptions.builder().httpClient(...). L’SDK non chiude i client di proprietà del chiamante; gestisci la loro durata nell'applicazione.
Passare un oggetto HttpClient attraverso WebIQClientOptions.HttpClient. L'SDK non rilascia un client HTTP di proprietà del chiamante; gestisci il suo ciclo di vita nell'applicazione.
Annullamento
Per le richieste asincrone, usare asyncio l'annullamento dell'attività o asyncio.timeout per imporre un budget a tempo in cui sono incluse le attese tra i tentativi. Un timeout dell'SDK per richiesta limita ogni tentativo HTTP.
Ogni metodo di risorsa accetta da AbortSignal a options.signal. L'interruzione annulla la richiesta in corso e i tempi di attesa dei tentativi di nuovo invio; la ragione del segnale viene propagata senza modifiche.
const response = await client.web.search('Microsoft Web IQ', {
signal: AbortSignal.timeout(5_000),
});
Per combinare il segnale di una richiesta in ingresso con un limite di clock a muro, usare AbortSignal.any([request.signal, AbortSignal.timeout(5_000)]).
Annullare o eliminare il future della richiesta per interrompere l'operazione, incluse le attese di ripetizione dei tentativi. Per un limite di tempo dell'applicazione, usare le utilità di tempo di Tokio e abilitare la funzionalità time di Tokio.
Usare un timeout per chiamata per limitare ogni tentativo HTTP. SDK 1.2.1 non espone un token di annullamento della richiesta. L'annullamento dell'oggetto restituito CompletableFuture non garantisce l'annullamento della richiesta HTTP sottostante o delle attese tra i tentativi.
Passare un CancellationToken oggetto per annullare l'operazione, incluse le attese di ripetizione dei tentativi:
using var cancellation = new CancellationTokenSource(TimeSpan.FromSeconds(5));
var response = await client.Web.SearchAsync("Microsoft Web IQ",
cancellationToken: cancellation.Token);
Telemetry
Collegare un callback di telemetria per registrare ogni tentativo di richiesta, stato e tempo trascorso. I dati di telemetria includono anche ID richiesta e traccia, indicazioni per i tentativi di nuovo invio e informazioni sugli errori. Evitare di registrare le credenziali o il contenuto di query sensibili.
import os
from webiq import WebIQClient, TelemetryEvent
def on_request(event: TelemetryEvent):
print(f"{event.method} {event.path}: {event.status_code} ({event.elapsed_ms}ms)")
with WebIQClient(
api_key=os.environ["WEBIQ_API_KEY"],
telemetry_hook=on_request,
) as client:
response = client.web.search("Microsoft Web IQ")
I campi di telemetria usano snake_case, tra cui attempt, status_coderequest_id, trace_id, retry_after, elapsed_ms, errore error_body.
import { WebIQClient } from '@microsoft/webiq';
const client = new WebIQClient({
apiKey: process.env.WEBIQ_API_KEY,
telemetryHook: event => {
console.log(`${event.method} ${event.path}: ${event.statusCode} (${event.elapsedMs}ms)`);
},
});
try {
await client.web.search('Microsoft Web IQ');
} finally {
await client.close();
}
I campi di telemetria usano camelCase, inclusi attempt, requestIdstatusCode, traceId, retryAfter, errorelapsedMse errorBody.
use std::sync::Arc;
use webiq::{TelemetryEvent, WebIqClient};
let client = WebIqClient::builder()
.api_key(std::env::var("WEBIQ_API_KEY")?)
.telemetry_hook(Arc::new(|event: &TelemetryEvent| {
println!("{} {}: {:?} ({:?}ms)",
event.method, event.path, event.status_code, event.elapsed_ms);
}))
.build()?;
client.web().search("Microsoft Web IQ", Default::default()).await?;
import com.microsoft.webiq.WebIQClient;
import com.microsoft.webiq.WebIQClientOptions;
WebIQClientOptions options = WebIQClientOptions.builder()
.apiKey(System.getenv("WEBIQ_API_KEY"))
.telemetryHook(event -> System.out.printf("%s %s: %s (%sms)%n",
event.getMethod(), event.getPath(),
event.getStatusCode(), event.getElapsedMs()))
.build();
try (WebIQClient client = new WebIQClient(options)) {
client.web.search("Microsoft Web IQ");
}
using Microsoft.WebIQ;
using var client = new WebIQClient(new WebIQClientOptions
{
ApiKey = Environment.GetEnvironmentVariable("WEBIQ_API_KEY"),
TelemetryHook = telemetry => Console.WriteLine(
$"{telemetry.Method} {telemetry.Path}: " +
$"{telemetry.StatusCode} ({telemetry.ElapsedMilliseconds}ms)")
});
await client.Web.SearchAsync("Microsoft Web IQ");
Gestione degli errori
Gestire gli errori di autenticazione, autorizzazione e limite di frequenza separatamente dagli errori temporanei. HTTP 429 e 430 si verificano immediatamente, senza tentativi dell’SDK. Usare le indicazioni per riprovare restituite per decidere quando riprovare.
Tutte le eccezioni SDK ereditano da WebIQError. Gli errori HTTP ereditano da APIStatusError, inclusi AuthenticationError, PermissionDeniedErrore RateLimitError. Gli errori di rete e i timeout generano APIConnectionError. La convalida delle richieste in Python può generare pydantic.ValidationError prima di inviare una richiesta.
from webiq import (
APIConnectionError, APIStatusError, AuthenticationError,
PermissionDeniedError, RateLimitError, WebIQError,
)
try:
response = client.web.search("Microsoft Web IQ")
except AuthenticationError as error:
print(f"Authentication failed: {error}")
except PermissionDeniedError as error:
print(f"Forbidden: {error}")
except RateLimitError as error:
print(f"Rate limited; retry after: {error.retry_after}")
except APIStatusError as error:
print(f"HTTP {error.status_code}: {error}")
if isinstance(error.body, dict):
print(error.body.get("errorCode"), error.body.get("traceId"))
except APIConnectionError as error:
print(f"Connection failed: {error}")
except WebIQError as error:
print(f"SDK error: {error}")
Esaminare in APIStatusError.body la risposta di errore completa del server, tra cui errorCategory, errorCode, technicalDetails, retryAfter e traceId.
Tutti gli errori dell'SDK ereditano da WebIQError. Gli errori HTTP ereditano da APIStatusError, inclusi AuthenticationError, PermissionDeniedErrore RateLimitError. Gli errori di rete e i timeout generano APIConnectionError.
import {
APIConnectionError, APIStatusError, AuthenticationError,
PermissionDeniedError, RateLimitError,
} from '@microsoft/webiq';
try {
await client.web.search('Microsoft Web IQ');
} catch (error) {
if (error instanceof AuthenticationError) {
console.error('Authentication failed:', error.message);
} else if (error instanceof PermissionDeniedError) {
console.error('Forbidden:', error.message);
} else if (error instanceof RateLimitError) {
console.error('Rate limited; retry after:', error.retryAfter);
} else if (error instanceof APIStatusError) {
console.error(`HTTP ${error.statusCode}:`, error.message);
if (error.body && typeof error.body === 'object') {
const body = error.body as Record<string, unknown>;
console.error(body.errorCode, body.traceId);
}
} else if (error instanceof APIConnectionError) {
console.error('Connection failed:', error.message);
} else {
throw error;
}
}
Esaminare in APIStatusError.body la risposta di errore completa del server, tra cui errorCategory, errorCode, technicalDetails, retryAfter e traceId.
Le chiamate restituiscono Result<T, WebIqError>. Individua gli errori API o esamina le funzioni di accesso agli errori per la diagnostica strutturata:
use webiq::WebIqError;
match client.web().search("Microsoft Web IQ", Default::default()).await {
Ok(response) => println!("{:?}", response.web_results),
Err(WebIqError::Authentication(details)) => eprintln!("401: {}", details.message),
Err(WebIqError::PermissionDenied(details)) => eprintln!("403: {}", details.message),
Err(WebIqError::RateLimit(details)) => {
eprintln!("Rate limited; retry after: {:?}", details.retry_after());
}
Err(error) => {
eprintln!("{error}");
eprintln!("Code: {:?}, trace: {:?}", error.error_code(), error.trace_id());
}
}
Gli errori dell'API espongono status_code(), error_category()error_code(), user_message(), technical_details(), retry_after(), request_id(), trace_id()e body(). I campi facoltativi mancanti restituiscono None.
Tutte le eccezioni SDK ereditano da WebIQException. Le eccezioni di stato HTTP ereditano da APIStatusException. Gli errori di rete e i timeout generano APIConnectionException.
import com.microsoft.webiq.errors.*;
try {
client.web.search("Microsoft Web IQ");
} catch (AuthenticationException error) {
System.err.println("Authentication failed: " + error.getMessage());
} catch (PermissionDeniedException error) {
System.err.println("Forbidden: " + error.getMessage());
} catch (RateLimitException error) {
System.err.println("Rate limited; retry after: " + error.getRetryAfter());
} catch (APIStatusException error) {
System.err.println("HTTP " + error.getStatusCode() + ": " + error.getMessage());
System.err.println("Code: " + error.getErrorCode() + ", trace: " + error.getTraceId());
} catch (APIConnectionException error) {
System.err.println("Connection failed: " + error.getMessage());
}
Le eccezioni di stato espongono getStatusCode(), getErrorCategory()getErrorCode(), getUserMessage(), getTechnicalDetails(), getRetryAfter(), getRequestId(), getTraceId()e getBody(). I campi facoltativi mancanti restituiscono null.
Le eccezioni di stato HTTP ereditano da ApiStatusException. Gli errori di rete e i timeout generano ApiConnectionException.
using Microsoft.WebIQ;
try
{
await client.Web.SearchAsync("Microsoft Web IQ");
}
catch (AuthenticationException error)
{
Console.Error.WriteLine($"Authentication failed: {error.Message}");
}
catch (PermissionDeniedException error)
{
Console.Error.WriteLine($"Forbidden: {error.Message}");
}
catch (RateLimitException error)
{
Console.Error.WriteLine($"Rate limited; retry after: {error.RetryAfter}");
}
catch (ApiStatusException error)
{
Console.Error.WriteLine($"HTTP {error.StatusCode}: {error.Message}");
Console.Error.WriteLine($"Code: {error.ErrorCode}, trace: {error.TraceId}");
}
catch (ApiConnectionException error)
{
Console.Error.WriteLine($"Connection failed: {error.Message}");
}
Le eccezioni di stato espongono ErrorCategory, ErrorCode, UserMessageTechnicalDetails, RetryAfter, RequestId, TraceId, e Body. I campi facoltativi mancanti sono null.
Browse può restituire HTTP 202 Accepted quando una scansione è in sospeso. Si tratta di una risposta normale, non di un'eccezione e l'SDK non esegue automaticamente il polling. Usare l'URL della risposta e il timestamp UTC retryAfter per riprovare in un secondo momento. Le risposte HTTP 200 parziali possono includere un truncationReasonoggetto , ad esempio "encumbrance".
Debug e passaggi successivi
- Includi
traceIdquando si contatta il supporto tecnico. Rust usatrace_id, Java usagetTraceId()e .NET usaTraceId. - Usare i dati di telemetria per correlare tentativi, codici di risposta e tempo trascorso.
- Esaminare il corpo dell'errore strutturato prima di considerare un errore come riprovabile. Vedi Gestione degli errori.
- Aggiungere la strumentazione di clic e citazione durante la visualizzazione o la citazione dei risultati della ricerca.