> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Search Bing

- Component: `appmixer.cloro.core.FindBingResults`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.cloro 1.1.0](https://connectors.appmixer.com/connector/appmixer.cloro/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.cloro/1.1.0/component/appmixer.cloro.core.FindBingResults>

Run a live Bing search with cloro and return the organic results of the first results page, at most about 10 results. It can also return the Bing AI Overview.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Query (`query`) | text | The search query to run on Bing. Bing accepts at most 3,500 characters after URL encoding. |
| Country (`country`) | text | 2-letter ISO 3166-1 country code for the location of the request, for example `US` or `DE`. The country sets the Bing market. `CN`, `KR` and `RU` are not available. |
| Include AI Overview (`aiOverview`) | toggle | Also get the AI Overview that Bing shows at the top of some results pages. It is sent to the `aiOverview` port. This uses more cloro credits. |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/cloro/core/FindBingResults?outPort=out&ignoreAuth=true`.

### Port `notFound`

| Field | Type | Description |
| --- | --- | --- |
| Query (`query`) | string | - |

### Port `aiOverview`

| Field | Type | Description |
| --- | --- | --- |
| Query (`query`) | string | - |
| AI Overview Text (`text`) | string | - |
| AI Overview Markdown (`markdown`) | string | - |
| Sources (`sources`) | array | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.cloro.core.FindBingResults",
  "label": "Search Bing",
  "description": "Run a live Bing search with cloro and return the organic results of the first results page, at most about 10 results. It can also return the Bing AI Overview.",
  "author": "cloro <info@cloro.dev>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:cloro"
  },
  "quota": {
    "manager": "appmixer:cloro",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "aiOverview": {
            "type": "boolean"
          },
          "outputType": {
            "type": "string"
          }
        },
        "required": [
          "query"
        ]
      },
      "inspector": {
        "inputs": {
          "query": {
            "type": "text",
            "index": 1,
            "label": "Query",
            "tooltip": "The search query to run on Bing. Bing accepts at most 3,500 characters after URL encoding."
          },
          "country": {
            "type": "text",
            "index": 2,
            "label": "Country",
            "defaultValue": "US",
            "tooltip": "2-letter ISO 3166-1 country code for the location of the request, for example <code>US</code> or <code>DE</code>. The country sets the Bing market. <code>CN</code>, <code>KR</code> and <code>RU</code> are not available."
          },
          "aiOverview": {
            "type": "toggle",
            "index": 3,
            "label": "Include AI Overview",
            "defaultValue": false,
            "tooltip": "Also get the AI Overview that Bing shows at the top of some results pages. It is sent to the <code>aiOverview</code> port. This uses more cloro credits."
          },
          "outputType": {
            "type": "select",
            "label": "Output Type",
            "index": 4,
            "defaultValue": "array",
            "tooltip": "Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file.",
            "options": [
              {
                "label": "First Item Only",
                "value": "first"
              },
              {
                "label": "All items at once",
                "value": "array"
              },
              {
                "label": "One item at a time",
                "value": "object"
              },
              {
                "label": "Store to CSV file",
                "value": "file"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/cloro/core/FindBingResults?outPort=out&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType",
            "in/query": "dummy"
          }
        }
      }
    },
    {
      "name": "notFound",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "title": "Query",
            "example": "best running shoes"
          }
        }
      }
    },
    {
      "name": "aiOverview",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "title": "Query",
            "example": "best running shoes"
          },
          "text": {
            "type": "string",
            "title": "AI Overview Text",
            "example": "Good running shoes give cushioning and support for your foot type ..."
          },
          "markdown": {
            "type": "string",
            "title": "AI Overview Markdown",
            "example": "Good running shoes give **cushioning** and **support** for your foot type ..."
          },
          "sources": {
            "type": "array",
            "title": "Sources",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "title": "Position",
                  "example": 1
                },
                "label": {
                  "type": "string",
                  "title": "Label",
                  "example": "Example Domain"
                },
                "url": {
                  "type": "string",
                  "title": "URL",
                  "example": "https://example.com/"
                },
                "description": {
                  "type": "string",
                  "title": "Description",
                  "example": "This domain is for use in documentation examples."
                }
              }
            },
            "example": [
              {
                "position": 1,
                "label": "Example Domain",
                "url": "https://example.com/",
                "description": "This domain is for use in documentation examples."
              }
            ]
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
