Skip to main content
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"
}
Get suggestions for hashtags based on a keyword. Data and view counts are generated from TikTok.

Header Parameters

Query Parameters

keyword
string
required
A single keyword to get recommended hashtags from TikTok. Spaces in the keyword will be removed.
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"
}