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
