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
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);
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())
$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;
{
"status": "success",
"id": "4HZhptaD5",
"title": "Pulte's Money and Life Thoughts",
"websiteLink": "https://pulte.substack.com",
"rssURL": "https://pulte.substack.com/feed"
}
{
"action": "create",
"status": "error",
"code": 303,
"message": "The feed https://ruthreichl.substack.com/feed already exists.",
"id": "TDW3oMDoI"
}
{
"action": "create",
"status": "error",
"code": 130,
"message": "Something is wrong with the RSS feed URL. Please verify it."
}
Feed
添加 RSS 订阅源
添加新的 RSS 订阅源以自动发布新文章
POST
/
feed
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
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);
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())
$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;
{
"status": "success",
"id": "4HZhptaD5",
"title": "Pulte's Money and Life Thoughts",
"websiteLink": "https://pulte.substack.com",
"rssURL": "https://pulte.substack.com/feed"
}
{
"action": "create",
"status": "error",
"code": 303,
"message": "The feed https://ruthreichl.substack.com/feed already exists.",
"id": "TDW3oMDoI"
}
{
"action": "create",
"status": "error",
"code": 130,
"message": "Something is wrong with the RSS feed URL. Please verify it."
}
添加新的 RSS 订阅源以自动发布新文章。帖子将自动发送到已关联的社交账户:Facebook、LinkedIn 和 Telegram。如果文章中能找到有效图片,也会发送到 Instagram 和 Pinterest。
请求头参数
请求体参数
要添加的 RSS 订阅源 URL。
尝试获取文章中的第一张或顶部图片并将其添加到帖子。
根据最相关的关键词自动为帖子文本添加最多 3 个 hashtag。
取值:
rss、substack 或 youtube。发布文章的社交网络平台。如果未提供,默认使用所有已连接的平台。可用平台:
{
"platforms": ["facebook", "instagram",
"linkedin", "pinterest"]
}
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
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);
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())
$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;
{
"status": "success",
"id": "4HZhptaD5",
"title": "Pulte's Money and Life Thoughts",
"websiteLink": "https://pulte.substack.com",
"rssURL": "https://pulte.substack.com/feed"
}
{
"action": "create",
"status": "error",
"code": 303,
"message": "The feed https://ruthreichl.substack.com/feed already exists.",
"id": "TDW3oMDoI"
}
{
"action": "create",
"status": "error",
"code": 130,
"message": "Something is wrong with the RSS feed URL. Please verify it."
}
⌘I
