---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.ru/dev/direct/doc/en/feeds/add.md
  - https://yandex.ru/dev/direct/doc/ru/feeds/add.md
sourcePath: en/ref-v5/feeds/add.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/en/llms.txt

# add

Creates feeds.

## Learn more

- [How the “add” method works](https://yandex.com/dev/direct/doc/best-practice/modify.html)
- [How to handle errors](https://yandex.com/dev/direct/doc/en/concepts/errors)

## Restrictions {#restrictions}

Maximum 50 feeds per user.

Maximum of 50 feeds per method call.

[Feed requirements](https://yandex.com/support/direct/en/ru/feeds/requirements).

See restrictions on the size of the feed in [Requirements for feeds uploaded via the API](https://yandex.com/dev/direct/doc/objects/feed.html).


## Request {#input}

Request structure in JSON format:

```javascript translate=no
{
  "method": "add",
  "params": { /* params */
    "Feeds": [{ /* FeedAddItem */
      "Name": (string), /* required */
      "BusinessType": ( "RETAIL" | "HOTELS" | "REALTY" | "AUTOMOBILES" | "FLIGHTS" | "OTHER" ), /* required */
      "SourceType": ( "URL" | "FILE" ), /* required */
      "UrlFeed": { /* UrlFeedAdd */
        "Url": (string), /* required */
        "RemoveUtmTags": ( "YES" | "NO" ),
        "Login": (string),
        "Password": (string),
      },
      "FileFeed": { /* FileFeedAdd */
        "Data": (base64Binary), /* required*/
        "Filename": (string) /* required */
      }
    }, ... ] /* required */
  }
}
```


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

||
**params structure (for JSON) / AddRequest structure (for SOAP)**
||
||
`Feeds`
|
array of FeedAddItem
|
Feeds to add (maximum of 50).
|
Yes
||

||
**FeedAddItem structure**
||
||
`Name`
|
string
|
The name of the feed. Maximum of 255 characters.
|
Yes
||
||
`BusinessType`
|
BusinessTypeEnum
|
Type of business. Defines the available feed formats. See [Business type for feed](https://yandex.com/dev/direct/doc/objects/feed.html).
|
Yes
||
||
`SourceType`
|
SourceTypeEnum
|
Type of data source:
- URL — The feed is available at the URL.
- FILE — The feed is passed in the request.
|
Yes
||
||
`UrlFeed`
|
UrlFeedAdd
|
Parameters of the feed that is available at the URL.
|
Use either `UrlFeed` or `FileFeed`
||
||
`FileFeed`
|
FileFeedAdd
|
Parameters of the feed that is passed in the request.
||

||
**UrlFeed structure**
||
||
`Url`
|
string
|
Feed URL. Maximum of 1024 characters. It must include the protocol and domain name.
|
Yes
||
||
`RemoveUtmTags`
|
YesNoEnum
|
Automatically delete UTM tags from links in the feed. The default value is NO.
|
No
||
||
`Login`
|
string
|
Login for accessing the feed (if required). A maximum of 50 characters.
|
No
||
||
`Password`
|
string
|
Password for accessing the feed (if required).
|
No
||

||
**FileFeedAdd structure**
||
||
`Data`
|
base64Binary
|
A base64-encoded feed to upload. The feed size is limited by the total request size — maximum of 50 MB.


{% note info %}

When using the SOAP library, place the feed file directly in this field, and the library automatically encodes it as base64 during transmission.

When using JSON format, first encode the binary data in base64, then pass it as a string.

{% endnote %}
|
Yes
||
||
`Filename`
|
string
|
Name of the feed file. Maximum of 255 characters.
|
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 feeds.
||

||
**ActionResult structure**
||
||
`Id`
|
long
|
The feed ID. 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.
||
|# 


## Example {#samples}

```javascript translate=no
{
  "method": "add",
  "params": {
    "Feeds": [{
      "Name": "MyFeed",
      "BusinessType": "RETAIL",
      "SourceType": "FILE",
      "FileFeed": {
        "Data": "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA..."
        "Filename": "myfeed.xml"
      }
    }]
  }
}
```

