Instagram hashtag generator API
Start from a curated hashtag set for your niche, pick the 5 tags that fit this exact post, and copy them in one click.
- Endpoint:
POST https://postboost.co/app/api/tools/instagram-hashtag-generator(operationIdgenerateHashtags) - Web tool: postboost.co/tools/instagram-hashtag-generator
- Also on the web: TikTok hashtag generator (
network: "tiktok") - Token: required. A new generation spends 1 AI credit of the workspace you name (or your active workspace); a repeated identical request is answered from the cache for free. A scoped API key needs the
aiability and pays with its own workspace - MCP: tool
generate-hashtagsonhttps://postboost.co/mcp/tools(listed only with a token)
Request
| Field | Type | Default | Description |
|---|---|---|---|
topic | string | What the post is about. | |
niche | string: Fitness, Food and restaurants, Travel, Fashion, Beauty and skincare, Small business, Real estate, Photography, Marketing and social media, Tech and SaaS, Pets, Education and coaching | Optional niche from the hashtag generator page. | |
network | string: instagram, tiktok, linkedin, x, threads, facebook | "instagram" | The network the text is written for. |
workspace | string | UUID of the workspace whose AI credits pay for the call. Default: your active workspace (a scoped API key: its own workspace). |
Call it
- curl
- Python
- Node.js
- PHP
- Go
- Ruby
- Java
- C#
- Rust
- CLI
curl -X POST https://postboost.co/app/api/tools/instagram-hashtag-generator \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"topic":"Morning routine for busy founders","network":"instagram"}'
from postboost import ApiClient, Configuration
from postboost.api.free_tools_api import FreeToolsApi
from postboost.models import FreeToolGenerateHashtagsRequest
with ApiClient(Configuration()) as client:
api = FreeToolsApi(client)
result = api.generate_hashtags(FreeToolGenerateHashtagsRequest.from_dict({"topic": "Morning routine for busy founders", "network": "instagram"}))
print(result.to_dict())
import { FreeToolsApi } from 'postboost';
const api = new FreeToolsApi();
const { body } = await api.generateHashtags({ topic: "Morning routine for busy founders", network: "instagram" });
console.log(body);
use PostBoostClient\Api\FreeToolsApi;
use PostBoostClient\Model\FreeToolGenerateHashtagsRequest;
$api = new FreeToolsApi(new GuzzleHttp\Client());
$result = $api->generateHashtags(new FreeToolGenerateHashtagsRequest(['topic' => "Morning routine for busy founders", 'network' => "instagram"]));
echo $result;
import (
"context"
"encoding/json"
"fmt"
postboost "github.com/postboost-co/postboost-go"
)
var request postboost.FreeToolGenerateHashtagsRequest
if err := json.Unmarshal([]byte(`{"topic":"Morning routine for busy founders","network":"instagram"}`), &request); err != nil {
panic(err)
}
client := postboost.NewAPIClient(postboost.NewConfiguration())
result, _, err := client.FreeToolsAPI.GenerateHashtags(context.Background()).FreeToolGenerateHashtagsRequest(request).Execute()
fmt.Println(result, err)
require 'postboost'
api = PostBoost::FreeToolsApi.new
result = api.generate_hashtags(PostBoost::FreeToolGenerateHashtagsRequest.new({ topic: "Morning routine for busy founders", network: "instagram" }))
puts result.to_hash
import com.postboost.ApiClient;
import com.postboost.api.FreeToolsApi;
import com.postboost.model.FreeToolGenerateHashtagsRequest;
import com.postboost.model.FreeToolGenerateHashtagsResponse;
FreeToolsApi api = new FreeToolsApi(new ApiClient());
FreeToolGenerateHashtagsRequest request = FreeToolGenerateHashtagsRequest.fromJson("{\"topic\":\"Morning routine for busy founders\",\"network\":\"instagram\"}");
FreeToolGenerateHashtagsResponse result = api.generateHashtags(request);
System.out.println(result.toJson());
using Newtonsoft.Json;
using PostBoost.Client.Api;
using PostBoost.Client.Client;
using PostBoost.Client.Model;
var api = new FreeToolsApi(new Configuration());
var request = JsonConvert.DeserializeObject<FreeToolGenerateHashtagsRequest>(@"{""topic"":""Morning routine for busy founders"",""network"":""instagram""}");
var result = await api.GenerateHashtagsAsync(request);
Console.WriteLine(result.ToJson());
use postboost::apis::configuration::Configuration;
use postboost::apis::free_tools_api;
use postboost::models::FreeToolGenerateHashtagsRequest;
let config = Configuration::new();
let request: FreeToolGenerateHashtagsRequest = serde_json::from_str(r##"{"topic":"Morning routine for busy founders","network":"instagram"}"##)?;
let result = free_tools_api::generate_hashtags(&config, request).await?;
println!("{:?}", result);
echo '{"topic":"Morning routine for busy founders","network":"instagram"}' | ./postboost-cli --content-type application/json generateHashtags -
This tool needs a token: send Authorization: Bearer YOUR_API_TOKEN as a default header (how, per SDK).
Response
{
"hashtags": [
"#morningroutine",
"#founderlife",
"#productivity",
"#startuplife",
"#dailyhabits"
],
"credits_spent": 1,
"cached": false
}
With MCP
Connect https://postboost.co/mcp/tools (setup) and ask, for example: Generate hashtags for a post topic with AI (needs a token, spends AI credits) with the PostBoost generate-hashtags tool.
Errors
| Status | When |
|---|---|
401 | No token, or an invalid one. The body has register_url to create a free account. |
403 | workspace is not a workspace you belong to, or your account has no workspace, or a scoped API key lacks the ai ability or is bound to another workspace (code: insufficient_scope). |
413 | The JSON body is larger than 128 KB. |
422 | A field is invalid; the body lists the errors per field. |
429 | The workspace has no AI credits left this billing cycle (code: ai_credits_exhausted, upgrade_url), or the per-minute limit is reached. |
502 | The AI provider failed or timed out. No credit was spent. |
503 | AI tools are switched off right now. |