> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add RSS Feed

> Add an RSS, Substack, or YouTube feed to auto-post new articles to linked social accounts, with options for useFirstImage, autoHashtag, and platforms.

Add a new RSS feed for automated posting of new articles. Posts will be automatically sent to your linked social accounts: Bluesky, Facebook, LinkedIn, Telegram, and Threads. Also Instagram and Pinterest if a valid image can be found in the article, and Snapchat if `useFirstImage` is `true` and an image is found — Snapchat cannot publish without media.

Reddit, TikTok, YouTube, and Google Business Profile are not available for feeds — each needs a detail a feed entry can't supply, such as a subreddit, a video file, or a location. See [why only these networks](https://www.ayrshare.com/docs/dashboard/automated-rss-feeds.md#why-only-these-networks).

> [!WARNING]
>
> **X/Twitter is no longer supported for RSS feeds.** As of March 31, 2026, X requires your own API credentials for each request, which is incompatible with automated RSS posting. Passing `twitter` in `platforms` is ignored; if it is the only platform given, the request returns error `101`. Use [scheduled posts](https://www.ayrshare.com/docs/apis/post/overview.md#schedule-posts) or direct API calls with your [BYO credentials](https://www.ayrshare.com/docs/dashboard/connect-social-accounts/x-twitter-byo-keys.md) instead.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Body Parameters

**url** `string` *required*

URL of the RSS feed to add.

**useFirstImage** `boolean` (default: false)

Attempt to get the first or top image in the article and add it to the post.

**autoHashtag** `boolean` (default: false)

Automatically add up to 3 hashtags to the post text based on the most relevant keywords.

**type** `string` (default: rss)

Value: `rss`, `substack`, or `youtube`.

**platforms** `array`

Social network platforms to publish the article. If not provided, defaults to all connected platforms that are available for feeds. Available platforms:

```json theme={"system"}
{
  "platforms": ["bluesky", "facebook", 
    "instagram", "linkedin", "pinterest", 
    "snapchat", "telegram", "threads"]
}
```

```javascript cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url": "https://www.nytimes.com"}' \
-X POST https://api.ayrshare.com/api/feed
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";
const url = "https:///www.nytimes.com";

fetch("https://api.ayrshare.com/api/feed", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${API_KEY}`
  },
  body: JSON.stringify({ url })
})
  .then((res) => res.json())
  .then((json) => console.log(json))
  .catch(console.error);
```

```python Python theme={"system"}
import requests

payload = {'url': 'https://www.nytimes.com'}
headers = {'Content-Type': 'application/json',
        'Authorization': 'Bearer API_KEY'}

r = requests.post('https://api.ayrshare.com/api/feed',
    json=payload,
    headers=headers)

print(r.json())
```

```php PHP theme={"system"}
$curl = curl_init();

$data = array (
    'url' => 'https://www.nytimes.com'
);

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.ayrshare.com/api/feed',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => http_build_query($data),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer API_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "id": "4HZhptaD5",
  "title": "Pulte's Money and Life Thoughts",
  "websiteLink": "https://pulte.substack.com",
  "feedURL": "https://pulte.substack.com/feed"
}
```

```json 400: Feed Already Exists theme={"system"}
{
  "action": "create",
  "status": "error",
  "code": 303,
  "message": "The feed https://ruthreichl.substack.com/feed already exists.",
  "id": "TDW3oMDoI"
}
```

```json 400: Invalid URL theme={"system"}
{
  "action": "create",
  "status": "error",
  "code": 130,
  "message": "Something is wrong with the RSS feed URL. Please verify it."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.