---
title: "The API Explorer tab"
slug: "the-api-explorer-tab"
abstract: "Sitecore Search API Explorer to test JSON requests to Search and Recommendation API."
---
# The API Explorer tab

The **API Explorer** tab on the **Developer Resources** page of the Sitecore Search is where developers create and run requests against their data. It is a live and interactive way of working with the [search and recommendation API](https://doc.sitecore.com/search/en/developers/search-developer-guide/integrating-using-rest-apis/using-the-search-and-recommendation-api-to-create-search-experiences.html "Using the Search and Recommendation API to create search experiences"). This topic describes some of the many ways you can use this tool.

The **API Explorer** tab is divided into three panes: the **Builder** pane, the **Request** pane, and the **Response** pane.

![api_explorer.png](https://doc.sitecore.com/api/markdown-image/search/en/developers/search-developer-guide/images/api_explorer.png)

## Build

In the **Build** pane, you can [enter or select values](https://doc.sitecore.com/search/en/developers/search-developer-guide/the-sitecore-search-interface/the-api-explorer-tab/test-a-search-request-using-the-api-explorer.html "Test a search request using the API Explorer") for an API request.

Your Sitecore Search implementation is configured for pages where each page has widgets that meet your requirements. The URL or the URL pattern configured for a page determines its content. When you select a page, its configured URL or URL pattern is set in the URL input field of the **Build** pane.

> [!note]
> The **API Explorer** cannot build API requests made by preview search widgets because they are not contained on pages. The **Build** can only build API requests for pages.

To see your request, click **Build**. The request is displayed in the **Request** pane.

## Request

In this pane, your request is displayed in JSON format. You can edit the JSON directly in this pane.

The following code is an example of a request.

```json
{
    "context": {
        "page": {
            "uri": "/search"
        },
        "user": {
            "user_id": "12145"
        }
    },
    "widget": {
        "rfkid": "rfkid_7"
    },
    "content": {
        "product": {}
    }
}
```

> [!note]
> An error indicates the values you must set or update if the request is missing any values relevant to your query.

Click ![open_in_full.png](https://doc.sitecore.com/api/markdown-image/search/en/developers/search-developer-guide/images/open_in_full.png) at the top-right of the pane to increase its size.

To export the request, click **Copy to Clipboard** and select from the following options:

- *Copy as cURL using Sitecore host*
- *Copy as cURL using your subdomain*
- *Copy as data object* to use in your code.

To test your request, click **Run**. The response is displayed in the **Response** pane.

> [!important]
> To avoid disrupting the search experience, the API is designed to never fail. It always returns the next best set of results based on information available.

## Response

The JSON response to your request is displayed in this pane. You can collapse and expand the JSON to see the structure and verify the response. To export the response, click **Copy to Clipboard** and then click **Copy as data object**.