auto-hashtag
Auto-HashTag API Endpoint: Automatically add hashtags to your posts based on the most relevant keywords. Takes into account real-time hashtag popularity. Premium or Business Plan required.

Auto Hashtag API Endpoint

Click the β€Ί in the endpoint to view details.
post
https://app.ayrshare.com/api
/auto-hashtag
Auto Hashtags

Request Examples

cURL
Node.js
Python
PHP
1
curl \
2
-H "Authorization: Bearer API_Key" \
3
-d '{"post": "Today is a great day!", "max": 3, "position": "auto"}
4
-X POST https://app.ayrshare.com/api/auto-hashtag
Copied!
1
const fetch = require("node-fetch");
2
const API_KEY = "API_KEY";
3
​
4
fetch(`https://app.ayrshare.com/api/auto-hashtag?post=${post}`, {
5
method: "POST",
6
headers: {
7
"Authorization": `Bearer ${API_KEY}`
8
},
9
body: JSON.stringify({
10
post: "Today is a great day!", // required
11
max: 3, // optional, range 1-5
12
position: "auto" // optional, "auto" or "end"
13
})
14
})
15
.then((res) => res.json())
16
.then((json) => console.log(json))
17
.catch(console.error);
Copied!
1
import requests
2
​
3
payload = {
4
'post': 'Today is a great day!',
5
'max': 3, # optional, range 1-5
6
'position': 'auto' # optional, 'auto' or 'end'
7
}
8
headers = {'Content-Type': 'application/json',
9
'Authorization': 'Bearer API_KEY'}
10
​
11
r = requests.post('https://app.ayrshare.com/api/auto-hashtag',
12
json=payload,
13
headers=headers)
14
15
print(r.json())
Copied!
1
<?php
2
require 'vendor/autoload.php';// Composer auto-loader using Guzzle. See https://docs.guzzlephp.org/en/stable/overview.html
3
​
4
$client = new GuzzleHttp\Client();
5
$res = $client->request(
6
'POST',
7
'https://app.ayrshare.com/api/auto-hashtag',
8
[
9
'headers' => [
10
'Content-Type' => 'application/json',
11
'Authorization' => 'Bearer API_KEY'
12
],
13
'json' => [
14
'post' => 'Today is a great day!',
15
'max' => 3,
16
'position' => 'auto'
17
]
18
]
19
);
20
​
21
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
Copied!
Last modified 5d ago