---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/direct/doc/en/negativekeywordsharedsets/add.md
  - https://yandex.ru/dev/direct/doc/ru/negativekeywordsharedsets/add.md
  - href: en/negativekeywordsharedsets/add.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/ref-v5/negativekeywordsharedsets/add.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/en/llms.txt

# add

Creates sets of negative keywords.

## Restrictions {#restrictions}

Maximum 30 sets of negative keywords per user.

Maximum 30 sets of negative keywords per method call.

## Request {#input}

Request structure in JSON format:

```javascript translate=no
{
  "method": "add",
  "params": { /* params */
    "NegativeKeywordSharedSets": [{  /* NegativeKeywordSharedSetAddItem */
      "Name": (string), /* required */
      "NegativeKeywords": [(string), ... ] /* required */
    }, ... ] /* required */
  }
}
```

#|
||
**Parameter**
|
**Type**
|
**Description**
|
**Required**
||

||
**params structure (for JSON) / AddRequest structure (for SOAP)**
||
||
`NegativeKeywordSharedSets`
|
array of NegativeKeywordSharedSetAddItem
|
Sets of negative keywords to add. Maximum of 30 items in the array.
|
Yes
||

||
**NegativeKeywordSharedSetAddItem structure**
||
||
`Name`
|
string
|
Name of a set of negative keywords (maximum 255 characters).
|
Yes
||
||
`NegativeKeywords`
|
array of string
|
Array of negative keywords.

<!-- source: en/_includes/adgroups/add/id-input/negative-keyword-rule1.md -->
A keyword should be specified without the minus sign before the first word.

Maximum of 7 words per keyword. The maximum length of each word is 35 characters. The maximum combined length of negative keywords in the array is 4096 characters. Spaces, dashes, and operators are not counted as part of the total length.
<!-- endsource: en/_includes/adgroups/add/id-input/negative-keyword-rule1.md -->
|
Yes
||
|# 


## Response {#output}

Response structure in JSON format:

```javascript translate=no
{
  "result": { /* result */
    "AddResults": [{  /* ActionResult */
      "Id": (long),
      "Warnings": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
      }, ... ],
      "Errors": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
      }, ... ]
    }, ... ]
  }
}
```

#|
||
**Parameter**
|
**Type**
|
**Description**
||

||
**result structure (for JSON) / AddResponse structure (for SOAP)**
||
||
`AddResults`
|
array of ActionResult
|
Results of adding sets of negative keywords.
||

||
**ActionResult structure**
||
||
`Id`
|
long
|
ID of the created set of negative keywords. Returned if there aren't any errors. See the section [Operations on object arrays](https://yandex.com/dev/direct/doc/best-practice/modify.html).
||
||
`Warnings`
|
array of [ExceptionNotification](https://yandex.com/dev/direct/doc/best-practice/modify.html)
|
Warnings that occurred during the operation.
||
||
`Errors`
|
array of [ExceptionNotification](https://yandex.com/dev/direct/doc/best-practice/modify.html)
|
Errors that occurred during the operation.
||
|# 

