# Setting ‘Keywords For Site’ Tasks

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/keywords_data/bing/keywords_for_site/task_post`

**Tags:** DataForSEO

Queues a Bing keywords-for-site task, returning a task `id`. Wrapped in DataForSEO's envelope: data in `tasks[0].result`, outcome in `tasks[0].status_code` - a rejected request still returns HTTP 200. Retrieve with `get_dataforseo_keywords_bing_kw_for_site_fetch`.

### Pricing reference

- Metering: Reported response cost.
- Reference request estimate: USD 0.09.
- Reference customer multiplier: 1.0. Do not apply it again to a settled customer amount.

Reference metadata only, not an account quote, a guaranteed price or a spending cap. Resource credits are not Felo credits. Final charges follow Felo billing records.

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "description": "<em>domain or URL</em><br><strong>required field</strong><br>the URL of the webpage or the domain to scan for possible keywords"
          },
          "location_name": {
            "type": "string",
            "description": "<em>full name of search engine location</em><br><strong>required field if you don't specify</strong> <code>location_code</code> or <code>location_coordinate</code><br><strong>if you use this field, you don't need to specify <code>location_code</code> or <code>location_coordinate</code></strong><br>you can receive the list of available locations of the search engine with their <code>location_name</code> by making a separate request to <code>https://api.dataforseo.com/v3/keywords_data/bing/locations</code><br>example:<br><code class=\"long-string\">London,England,United Kingdom</code>"
          },
          "location_code": {
            "type": "integer",
            "description": "<em>search engine location code</em><br><strong>required field if you don't specify</strong> <code>location_name</code> or <code>location_coordinate</code><br><strong>if you use this field, you don't need to specify <code>location_name</code> or <code>location_coordinate</code></strong><br>you can receive the list of available locations of the search engines with their <code>location_code</code> by making a separate request to <code>https://api.dataforseo.com/v3/keywords_data/bing/locations</code><br>example:<br><code class=\"long-string\">2840</code>"
          },
          "location_coordinate": {
            "type": "string",
            "description": "<em>GPS coordinates of a location</em><br><strong>required field if you don't specify</strong> <code>location_name</code> or <code>location_code</code><br><strong>if you use this field, you don't need to specify <code>location_name</code> or <code>location_code</code></strong><br><code>location_coordinate</code> parameter should be specified in the <em>\"latitude,longitude\"</em> format<br><strong>the data will be provided for the country the specified coordinates belong to</strong><br>example:<br><code class=\"long-string\">52.6178549,-155.352142</code>"
          },
          "language_name": {
            "type": "string",
            "description": "<em>full name of search engine language</em><br><strong>required field if you don't specify</strong> <code>language_code</code><br>if you use this field, you don't need to specify <code>language_code</code><br>supported languages:<br><code>English</code>, <code>French</code>, <code>German</code>"
          },
          "language_code": {
            "type": "string",
            "description": "<em>search engine language code</em><br><strong>required field if you don't specify</strong> <code>language_name</code><br>if you use this field, you don't need to specify <code>language_name</code><br>supported languages:<br><code class=\"long-string\">en</code>, <code>fr</code>, <code>de</code>"
          },
          "keywords_negative": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>keywords negative array</em><br>optional field<br>These keywords will be ignored in the results array;<br>You can specify <strong>a maximum of 200 terms</strong> that you want to exclude from the results;<br>the specified keywords will be converted to lowercase format"
          },
          "device": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>device type</em><br>optional field<br>specify this field if you want to get the data for a particular device type<br>possible values: <code>all</code>, <code>mobile</code>, <code>desktop</code>, <code>tablet</code><br>default value: <code>all</code>"
          },
          "sort_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>results sorting parameters</em><br>optional field<br>Use these parameters to sort the results by <code>search_volume</code>, <code>cpc</code>, <code>competition</code> or <code>relevance</code> in the descending order<br>default value: <code>relevance</code>"
          },
          "date_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>starting date of the time range</em><br>optional field<br>minimal value: 24 months from today's date;<br>if you don't specify this field, data will be provided for the last 12 months;<br>if <a href=\"/v3/keywords_data/bing/status/\" target=\"_blank\" rel=\"noopener noreferrer\">Status endpoint</a> returns <code>false</code> in the <code>actual_data</code> field, <code>date_from</code> can be set to the month before last and prior;<br>if <a href=\"/v3/keywords_data/bing/status/\" target=\"_blank\" rel=\"noopener noreferrer\">Status endpoint</a> returns <code>true</code> in the <code>actual_data</code> field, <code>date_from</code> can be set to the last month and prior;<br>date format: <code>\"yyyy-mm-dd\"</code><br>example:<br><code>\"2020-01-01\"</code><p><strong>Note:</strong> we do not recommend using a custom time range for the past year's dates"
          },
          "date_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ending date of the time range</em><br>optional field<br>if you don't specify this field, data will be provided for the last 12 months;<br>minimum value: two years back from today’s date;<br>maximum value: one month from today's date;<br>date format: <code>\"yyyy-mm-dd\"</code><br>example:<br><code>\"2020-03-15\"</code><p><strong>Note:</strong> we do not recommend using a custom time range for the past year's dates"
          },
          "postback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>URL for sending task results</em><br>optional field<br>once the task is completed, we will send a POST request with its results compressed in the <code>gzip</code> format to the <code>postback_url</code> you specified<br>you can use the ‘$id’ string as a <code>$id</code> variable and ‘$tag’ as urlencoded <code>$tag</code> variable. We will set the necessary values before sending the request.<br>example:<br><code>http://your-server.com/postbackscript?id=$id</code><br><code>http://your-server.com/postbackscript?id=$id&amp;tag=$tag</code><br><strong>Note:</strong> special characters in <code>postback_url</code> will be urlencoded;<br>i.a., the <code>#</code> character will be encoded into <code>%23</code><p>learn more on our <a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">Help Center</a>"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>notification URL of a completed task</em><br>optional field<br>when a task is completed we will notify you by GET request sent to the URL you have specified<br>you can use the ‘$id’ string as a <code>$id</code> variable and ‘$tag’ as urlencoded <code>$tag</code> variable. We will set the necessary values before sending the request.<br>example:<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>Note:</strong> special characters in <code>pingback_url</code> will be urlencoded;<br>i.a., the <code>#</code> character will be encoded into <code>%23</code><p>learn more on our <a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">Help Center</a>"
          },
          "search_partners": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>Bing search partners type</em><br>optional field<br>if you specify <code class=\"prettyprint\">true</code>, the results will be delivered for owned, operated, and syndicated networks across Bing, Yahoo, AOL and partner sites that host Bing, AOL, and Yahoo search.<br>default value: <code>false</code> - results are returned for Bing, AOL, and Yahoo search networks"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response"
          }
        },
        "example": [
          {
            "language_code": "en",
            "location_code": 2840,
            "target": "dataforseo.com"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "language_code": "en",
      "location_code": 2840,
      "target": "dataforseo.com"
    }
  ]
}
```

## Responses

### 200 — Successful operation

Headers:
- `X-Request-Id` (string) — Request identifier to include when contacting Felo support.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataBingKeywordsForSiteTaskPostResponseInfo"
    }
  ]
}
```

### 400 — The request could not be processed. Check the request parameters.

### 401 — A valid Felo API key is required.

### 402 — The request cannot proceed because a billing requirement is not met.

### 403 — The account is not permitted to perform this operation.

### 429 — A request or spending limit has been reached.

### 502 — The service could not complete the request.

### 503 — The API or billing service is temporarily unavailable.

### 504 — The service timed out while processing the request.

### default — Error response; upstream passthrough responses may use provider formats

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "the current version of the API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "general status code\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "general informational message\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "total execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array returned with an error",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "task identifier\nunique task identifier in our system in the UUID format"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "status code of the task\ngenerated by DataForSEO, can be within the following range: 10000-60000\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "informational message of the task\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "number of elements in the result array",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL path"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "contains the same parameters that you specified in the POST request"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataBingKeywordsForSiteTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataBingKeywordsForSiteTaskPostResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataBingKeywordsForSiteTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>array of tasks</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_KeywordsDataBingKeywordsForSiteTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataBingKeywordsForSiteTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "object",
            "null"
          ],
          "description": "<em>array of results</em><br>in this case, the value will be <code>null</code>"
        }
      }
    }
  ]
}
```
