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
Auto Hashtags
Add the most relevant hashtags to your post
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"
}
When creating your post, add relevant hashtags by either embedding them within the text or placing them at the end.
Our advanced AI system will analyze your content to generate appropriate hashtags based on the subject matter.
Although you can use any language for your post, writing in English typically yields the best results for our hashtag generation process.
Header Parameters
Body Parameters
string
required
Post text to add the hashtags. Max length 1,000 characters.
string
validate
integer
default:2
Integer of max number of Hashtags to add. Max value range 1 to 10. Note: Instagram allows a maximum of 5 hashtags per post.
string
Specify the language code of the language of the post to assist the hashtag algorithm.
{
"language": "fr"
}
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
