curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/hashtags/recommend?keyword=apple
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/hashtags/recommend?keyword=apple", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/hashtags/recommend?keyword=apple', 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(
'GET',
'https://api.ayrshare.com/api/hashtags/recommend?keyword=apple',
[
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY'
]
]
);
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HashtagsRecommendGETRequest_csharp
{
class HashtagsRecommend
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/hashtags/recommend?keyword=apple";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
}
{
"keyword": "apple",
"recommendations": [
{
"viewCount": 71950998550, // The number of views that the recommended hashtag has received.
"name": "apple" // Suggested hashtag
},
{
"viewCount": 6318280101,
"name": "applewatch"
},
{
"viewCount": 2486358394,
"name": "applepencil"
},
{
"viewCount": 2142842131,
"name": "applemusic"
},
{
"viewCount": 1506224079,
"name": "applesquad"
},
{
"viewCount": 1307287255,
"name": "apples"
},
{
"viewCount": 1008293028,
"name": "applepie"
},
{
"viewCount": 788388838,
"name": "applejuice"
},
{
"viewCount": 1024901638,
"name": "appletv"
},
{
"viewCount": 679033194,
"name": "applechallenge"
}
]
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
Hashtags
Đề xuất Hashtag
Nhận gợi ý hashtag dựa trên từ khóa
GET
/
hashtags
/
recommend
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/hashtags/recommend?keyword=apple
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/hashtags/recommend?keyword=apple", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/hashtags/recommend?keyword=apple', 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(
'GET',
'https://api.ayrshare.com/api/hashtags/recommend?keyword=apple',
[
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY'
]
]
);
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HashtagsRecommendGETRequest_csharp
{
class HashtagsRecommend
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/hashtags/recommend?keyword=apple";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
}
{
"keyword": "apple",
"recommendations": [
{
"viewCount": 71950998550, // The number of views that the recommended hashtag has received.
"name": "apple" // Suggested hashtag
},
{
"viewCount": 6318280101,
"name": "applewatch"
},
{
"viewCount": 2486358394,
"name": "applepencil"
},
{
"viewCount": 2142842131,
"name": "applemusic"
},
{
"viewCount": 1506224079,
"name": "applesquad"
},
{
"viewCount": 1307287255,
"name": "apples"
},
{
"viewCount": 1008293028,
"name": "applepie"
},
{
"viewCount": 788388838,
"name": "applejuice"
},
{
"viewCount": 1024901638,
"name": "appletv"
},
{
"viewCount": 679033194,
"name": "applechallenge"
}
]
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
Nhận các gợi ý hashtag dựa trên từ khóa. Dữ liệu và số lượt xem được tạo từ TikTok.
Header Parameters
Query Parameters
Một từ khóa duy nhất để nhận các hashtag được đề xuất từ TikTok. Khoảng trắng trong từ khóa sẽ bị loại bỏ.
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/hashtags/recommend?keyword=apple
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/hashtags/recommend?keyword=apple", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/hashtags/recommend?keyword=apple', 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(
'GET',
'https://api.ayrshare.com/api/hashtags/recommend?keyword=apple',
[
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY'
]
]
);
echo json_encode(json_decode($res->getBody()), JSON_PRETTY_PRINT);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HashtagsRecommendGETRequest_csharp
{
class HashtagsRecommend
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/hashtags/recommend?keyword=apple";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
}
{
"keyword": "apple",
"recommendations": [
{
"viewCount": 71950998550, // The number of views that the recommended hashtag has received.
"name": "apple" // Suggested hashtag
},
{
"viewCount": 6318280101,
"name": "applewatch"
},
{
"viewCount": 2486358394,
"name": "applepencil"
},
{
"viewCount": 2142842131,
"name": "applemusic"
},
{
"viewCount": 1506224079,
"name": "applesquad"
},
{
"viewCount": 1307287255,
"name": "apples"
},
{
"viewCount": 1008293028,
"name": "applepie"
},
{
"viewCount": 788388838,
"name": "applejuice"
},
{
"viewCount": 1024901638,
"name": "appletv"
},
{
"viewCount": 679033194,
"name": "applechallenge"
}
]
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
⌘I
