curl \
-H "Authorization: Bearer API_Key" \
-d '{"post": "Today is a great day!", "max": 3, "position": "auto"}'
-X POST https://api.ayrshare.com/api/hashtags/auto
const API_KEY = "API_KEY";
fetch(`https://api.ayrshare.com/api/hashtags/auto`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
post: "Today is a great day!", // required
max: 3, // optional, range 1-5
position: "auto" // optional, "auto" or "end"
})
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {
'post': 'Today is a great day!',
'max': 3, # optional, range 1-5
'position': 'auto' # optional, 'auto' or 'end'
}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://api.ayrshare.com/api/hashtags/auto',
json=payload,
headers=headers)
print(r.json())
<?php
require 'vendor/autoload.php';// Composer auto-loader using Guzzle. See .../guzzlephp.org/en/stable/overview.html
$client = new GuzzleHttp\Client();
$res = $client->request(
'POST',
'https://api.ayrshare.com/api/hashtags/auto',
[
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY'
],
'json' => [
'post' => 'Today is a great day!',
'max' => 3,
'position' => 'auto'
]
]
);
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
{
post: "Disney’s trouble with Oswald the #LuckyRabbit is a great lesson #ForStartups in a crisis"
}
Hashtags
自动 hashtag
为你的帖子添加最相关的 hashtag
POST
/
hashtags
/
auto
curl \
-H "Authorization: Bearer API_Key" \
-d '{"post": "Today is a great day!", "max": 3, "position": "auto"}'
-X POST https://api.ayrshare.com/api/hashtags/auto
const API_KEY = "API_KEY";
fetch(`https://api.ayrshare.com/api/hashtags/auto`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
post: "Today is a great day!", // required
max: 3, // optional, range 1-5
position: "auto" // optional, "auto" or "end"
})
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {
'post': 'Today is a great day!',
'max': 3, # optional, range 1-5
'position': 'auto' # optional, 'auto' or 'end'
}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://api.ayrshare.com/api/hashtags/auto',
json=payload,
headers=headers)
print(r.json())
<?php
require 'vendor/autoload.php';// Composer auto-loader using Guzzle. See .../guzzlephp.org/en/stable/overview.html
$client = new GuzzleHttp\Client();
$res = $client->request(
'POST',
'https://api.ayrshare.com/api/hashtags/auto',
[
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY'
],
'json' => [
'post' => 'Today is a great day!',
'max' => 3,
'position' => 'auto'
]
]
);
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
{
post: "Disney’s trouble with Oswald the #LuckyRabbit is a great lesson #ForStartups in a crisis"
}
在创建帖子时,可以将相关 hashtag 嵌入文本中或放在文本末尾。
我们先进的 AI 系统会分析你的内容,根据主题生成合适的 hashtag。
虽然帖子可以使用任何语言,但用英文书写通常能获得最佳的 hashtag 生成效果。
请求头参数
请求体参数
要添加 hashtag 的帖子文本。最长 1,000 字符。
validate
最多添加 hashtag 数量的整数值。取值范围 1 到 10。注意:Instagram 每篇帖子最多允许 5 个 hashtag。
curl \
-H "Authorization: Bearer API_Key" \
-d '{"post": "Today is a great day!", "max": 3, "position": "auto"}'
-X POST https://api.ayrshare.com/api/hashtags/auto
const API_KEY = "API_KEY";
fetch(`https://api.ayrshare.com/api/hashtags/auto`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
post: "Today is a great day!", // required
max: 3, // optional, range 1-5
position: "auto" // optional, "auto" or "end"
})
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {
'post': 'Today is a great day!',
'max': 3, # optional, range 1-5
'position': 'auto' # optional, 'auto' or 'end'
}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://api.ayrshare.com/api/hashtags/auto',
json=payload,
headers=headers)
print(r.json())
<?php
require 'vendor/autoload.php';// Composer auto-loader using Guzzle. See .../guzzlephp.org/en/stable/overview.html
$client = new GuzzleHttp\Client();
$res = $client->request(
'POST',
'https://api.ayrshare.com/api/hashtags/auto',
[
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY'
],
'json' => [
'post' => 'Today is a great day!',
'max' => 3,
'position' => 'auto'
]
]
);
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
{
post: "Disney’s trouble with Oswald the #LuckyRabbit is a great lesson #ForStartups in a crisis"
}
⌘I
