Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Nella maggior parte delle pagine della documentazione, sul lato destro dello schermo è visibile una versione condensata di Explorer API. Se l'Explorer API non è visibile, fai clic su
Prova per visualizzare la versione condensata dell'Explorer API.
Se Prova non viene visualizzato sul lato destro di una pagina di documentazione di riferimento, il metodo non è supportato da Explorer API. Ad esempio, APIs Explorer non è compatibile con le API che richiedono service account, quindi non viene visualizzato nelle pagine di documentazione di queste API.
Visualizza la versione espansa di Explorer API
La versione espansa di Explorer API contiene esempi di codice cURL, HTTP e forse
altri. Per visualizzare la versione espansa di Explorer API,
fai clic su Schermo intero fullscreen.
Eseguire un metodo
L'Explorer API ti consente di inserire parametri obbligatori, parametri facoltativi e, se applicabile, un corpo della richiesta per i metodi API. Per molti metodi REST, come i metodi di elenco, devi compilare solo uno o due campi prima di poter eseguire il metodo. Ad esempio, il metodo
books.volumes.list
dell'API Books richiede solo un parametro di query (q) per elencare i libri. Per provare il
metodo books.volumes.list:
Se Explorer API non viene visualizzato, fai clic su Prova.
Nel campo q, digita Hunger Games (senza virgolette o caratteri speciali).
Scorri verso il basso e fai clic su Esegui.
(Facoltativo) Una schermata di accesso a Google ti chiede di selezionare un Account Google.
(facoltativo) Una finestra di dialogo di autorizzazione di Google ti chiede se è consentito
"Gestire i tuoi libri". Fai clic su Consenti. I risultati vengono visualizzati sotto il pulsante Esegui.
Se l'Explorer API mostra un risultato di 200, il metodo è stato eseguito correttamente.
Risoluzione dei problemi di Explorer API
Hai ricevuto un errore 401 o 403
Se ricevi un errore 401 o 403 durante l'esecuzione di un metodo utilizzando l'API Explorer, è probabile che il problema sia dovuto a uno dei seguenti motivi:
Stai utilizzando il tipo di autorizzazione errato (chiave API anziché OAuth 2.0).
Prova a cambiare il tipo di autorizzazione.
Stai utilizzando OAuth 2.0, ma con un ambito troppo ristretto. Prova a utilizzare un ambito più ampio.
La finestra di dialogo di autorizzazione non viene visualizzata
L'Explorer API utilizza un popup per concedere l'accesso ai tuoi dati privati. Se il tuo
browser blocca i popup, questo popup non verrà visualizzato e non potrai concedere
l'accesso.
Se fai clic su Consenti nella finestra di dialogo di autorizzazione e non succede nulla, prova a
modificare le impostazioni dei popup del browser per abilitare i popup.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eThe APIs Explorer allows you to test API methods directly in the documentation by providing parameters and executing requests.\u003c/p\u003e\n"],["\u003cp\u003eTo use the APIs Explorer with methods requiring authorization, you need to generate and use your own credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe expanded APIs Explorer provides code samples in various formats like cURL and HTTP for easier integration.\u003c/p\u003e\n"],["\u003cp\u003eIf you encounter a 401 or 403 error, verify the authorization type and scope, as they are the most common causes.\u003c/p\u003e\n"],["\u003cp\u003eThe APIs Explorer uses popups for authorization, so ensure your browser settings allow them to function correctly.\u003c/p\u003e\n"]]],[],null,["# Display the APIs Explorer and execute a method\n\nOn most documentation pages, a condensed APIs Explorer is visible on the\nright-hand side of the screen. If the APIs Explorer isn't visible, click\n**Try it!** to display the condensed version of the APIs Explorer.\n\nIf **Try it!** doesn't appear on the right-hand side of a reference\ndocumentation page, the method isn't supported by the APIs Explorer. For\nexample, the APIs Explorer isn't compatible with APIs that require service\naccounts, so it doesn't appear on documentation pages for those APIs.\n\nDisplay the expanded version of the APIs Explorer\n-------------------------------------------------\n\nThe expanded version of the APIs Explorer contains cURL, HTTP, and possibly\nother code samples. To display the expanded version of the APIs Explorer,\nclick Full screen fullscreen.\n| **Note:** To run the code samples, you must generate and use your own authorization credentials. For an explanation of how to create a project and generate credentials, refer to your specific Google API's documentation.\n\nExecute a method\n----------------\n\nThe APIs Explorer lets you enter required parameters, optional parameters,\nand, if applicable, a request body for API methods. For many REST methods,\nsuch as list methods, you only need to fill one or two fields before you can\nexecute the method. For example, the Books API's\n[`books.volumes.list`](/books/docs/v1/reference/volumes/list)\nmethod only requires a query parameter (`q`) to list books. To try the\n[`books.volumes.list`](/books/docs/v1/reference/volumes/list)\nmethod:\n\n1. Navigate to [`books.volumes.list`](/books/docs/v1/reference/volumes/list).\n2. If the APIs Explorer isn't displayed, click **Try it!**\n3. In the **`q`** field, type *Hunger Games* (without any quotes or special characters).\n4. Scroll down and click **Execute**.\n5. (optional) A Google sign-in screen asks you to select a Google account.\n6. (optional) A Google authorization dialog asks you if it's okay to \"Manage your books.\" Click *Allow*. The results appear below the Execute button.\n\nIf the APIs Explorer shows a result of 200, then the method was successful.\n| **Note:** After you allow the authorization screen to make an authorized request, the APIs Explorer is authorized to make other requests until the credentials expire. Therefore, you don't see the authorization screen for every subsequent method call. For further information on credentials, see [Test with different credential types and scopes](/explorer-help/authorization-and-authentication).\n\nTroubleshoot APIs Explorer issues\n---------------------------------\n\n### You received a 401 or 403 error\n\nIf you're getting a 401 or 403 error when executing a method using the APIs\nExplorer, it is likely due to a problem with one of the following:\n\n- You're using the wrong authorization type (API key instead of OAuth 2.0). Try switching the authorization type.\n- You're using OAuth 2.0, but with too narrow a scope. Try using a broader scope.\n\n### Authorization dialog doesn't appear\n\nThe APIs Explorer uses a popup to grant access to your private data. If your\nbrowser blocks popups, this popup won't appear and you won't be able to grant\naccess.\n\nIf you click **Allow** in the authorization dialog and nothing happens, try\nchanging your browser's popup settings to enable popups."]]