Get hook templates API
Get free hook templates for social media posts, filtered by style and network.
- Endpoint:
GET https://postboost.co/app/api/tools/hook-generator/library(operationIdgetHookTemplates) - Web tool: postboost.co/tools/hook-generator
- Token: optional (limits)
- MCP: tool
get-hook-templatesonhttps://postboost.co/mcp/tools
Request
| Query parameter | Type | Default | Description |
|---|---|---|---|
topic | string | What the post is about. Fills the \{topic\} placeholder of every template; omit it to get the templates as they are. | |
category | string: question, contrarian, list, story, mistake, how-to, curiosity, social-proof | Hook style. Omit it for every style. | |
network | string: instagram, tiktok, linkedin, x, threads, facebook | Only templates that suit this network. Omit it for every network. | |
search | string | Only templates whose text contains these words (case-insensitive). |
Call it
- curl
- Python
- Node.js
- PHP
- Go
- Ruby
- Java
- C#
- Rust
- CLI
curl 'https://postboost.co/app/api/tools/hook-generator/library?topic=email%20marketing&category=question&network=linkedin'
from postboost import ApiClient, Configuration
from postboost.api.free_tools_api import FreeToolsApi
with ApiClient(Configuration()) as client:
api = FreeToolsApi(client)
result = api.get_hook_templates(topic='email marketing', category='question', network='linkedin')
print(result.to_dict())
import { FreeToolsApi } from 'postboost';
const api = new FreeToolsApi();
const { body } = await api.getHookTemplates('email marketing', 'question', 'linkedin');
console.log(body);
use PostBoostClient\Api\FreeToolsApi;
$api = new FreeToolsApi(new GuzzleHttp\Client());
$result = $api->getHookTemplates("email marketing", "question", "linkedin");
echo $result;
import (
"context"
"fmt"
postboost "github.com/postboost-co/postboost-go"
)
client := postboost.NewAPIClient(postboost.NewConfiguration())
result, _, err := client.FreeToolsAPI.GetHookTemplates(context.Background()).Topic("email marketing").Category("question").Network("linkedin").Execute()
fmt.Println(result, err)
require 'postboost'
api = PostBoost::FreeToolsApi.new
result = api.get_hook_templates(topic: 'email marketing', category: 'question', network: 'linkedin')
puts result.to_hash
import com.postboost.ApiClient;
import com.postboost.api.FreeToolsApi;
import com.postboost.model.FreeToolGetHookTemplatesResponse;
FreeToolsApi api = new FreeToolsApi(new ApiClient());
FreeToolGetHookTemplatesResponse result = api.getHookTemplates("email marketing", "question", "linkedin");
System.out.println(result.toJson());
using PostBoost.Client.Api;
using PostBoost.Client.Client;
var api = new FreeToolsApi(new Configuration());
var result = await api.GetHookTemplatesAsync("email marketing", "question", "linkedin");
Console.WriteLine(result.ToJson());
use postboost::apis::configuration::Configuration;
use postboost::apis::free_tools_api;
let config = Configuration::new();
let result = free_tools_api::get_hook_templates(&config, Some("email marketing"), Some("question"), Some("linkedin"), None).await?;
println!("{:?}", result);
./postboost-cli getHookTemplates topic='email marketing' category='question' network='linkedin'
With a token, send Authorization: Bearer YOUR_API_TOKEN as a default header (how, per SDK).
Response
{
"hooks": [
{
"text": "What would change if you treated email marketing as a weekly habit instead of a one-off project?",
"template": "What would change if you treated {topic} as a weekly habit instead of a one-off project?",
"category": "question",
"networks": [
"instagram",
"tiktok",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "Which part of email marketing do you keep putting off, and why?",
"template": "Which part of {topic} do you keep putting off, and why?",
"category": "question",
"networks": [
"instagram",
"tiktok",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "Is email marketing worth the time it takes? My honest answer after trying it.",
"template": "Is {topic} worth the time it takes? My honest answer after trying it.",
"category": "question",
"networks": [
"instagram",
"tiktok",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "What do people get wrong about email marketing when they first start?",
"template": "What do people get wrong about {topic} when they first start?",
"category": "question",
"networks": [
"instagram",
"tiktok",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "If you could keep only one rule for email marketing, which would it be?",
"template": "If you could keep only one rule for {topic}, which would it be?",
"category": "question",
"networks": [
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "Why does email marketing feel harder than it should?",
"template": "Why does {topic} feel harder than it should?",
"category": "question",
"networks": [
"instagram",
"tiktok",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "How much time do you really spend on email marketing each week?",
"template": "How much time do you really spend on {topic} each week?",
"category": "question",
"networks": [
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "What would you tell a beginner about email marketing that nobody told you?",
"template": "What would you tell a beginner about {topic} that nobody told you?",
"category": "question",
"networks": [
"instagram",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "Do you plan email marketing ahead or make it up as you go?",
"template": "Do you plan {topic} ahead or make it up as you go?",
"category": "question",
"networks": [
"instagram",
"tiktok",
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "What is the smallest step that would make email marketing easier tomorrow?",
"template": "What is the smallest step that would make {topic} easier tomorrow?",
"category": "question",
"networks": [
"linkedin",
"x",
"threads",
"facebook"
]
},
{
"text": "Quick poll: how do you handle email marketing?",
"template": "Quick poll: how do you handle {topic}?",
"category": "question",
"networks": [
"linkedin",
"x",
"threads",
"facebook"
]
}
],
"total": 11
}
With MCP
Connect https://postboost.co/mcp/tools (setup) and ask, for example: Get free hook templates for social media posts, filtered by style and network with the PostBoost get-hook-templates tool.
Errors
| Status | When |
|---|---|
401 | The Authorization header holds an invalid token. Leave it out to call as a guest. |
413 | The JSON body is larger than 128 KB. |
422 | A field is invalid; the body lists the errors per field. |
429 | A limit is reached; see limits. |