# Social Metadata Generator - Titles, Hashtags & SEO Tags (`dami_studio/social-metadata-generator`) Actor

Never write a title or hashtag block again. Feed it a topic or script and get scroll-stopping title options, an optimized caption, hashtags, 10-15 SEO keyword tags and a pinned-comment idea - length-tuned per platform for YouTube, Shorts, TikTok, Reels and X. Batch-ready, bring your OpenAI key.

- **URL**: https://apify.com/dami\_studio/social-metadata-generator.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Social media, SEO tools, For creators
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 metadata packs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Social Media Metadata Generator

Give it a video topic or a full script and it returns a complete publishing metadata pack: several title options, an optimized description/caption, hashtags, SEO keyword tags, and a pinned-comment idea. Everything is tuned to one platform at a time (YouTube long-form, YouTube Shorts, TikTok, Instagram Reels, or X/Twitter) so the character limits and hashtag counts match where you're actually posting. It's meant for people running a content pipeline who want to stop hand-writing titles and tags for every upload.

### How it works

Each item goes through a single chat-completion call with a platform-specific prompt that enforces that platform's title length, description limit, and hashtag count. The response comes back as structured JSON, then gets cleaned up (hashtags normalized to `#nospaces`, tags stripped of `#`).

### Input

You need either `text` or `sources`. Everything else has a sensible default. An OpenAI key is required for real generation because it runs on an AI model. If you run it with **no key**, the actor returns one clearly-labeled **sample** record (`_sample: true`) so you can preview the output shape — add your key for real, AI-written metadata.

| Field | Required | Notes |
|---|---|---|
| `text` | one of text/sources | The topic, title idea, or full script to generate metadata for. |
| `sources` | one of text/sources | Array for batch runs. Strings, or objects with `title`/`script`/`scriptText`/`text`/`selftext`. Pipe the Script Rewriter or a Reddit scraper straight in. |
| `platform` | no | `youtube`, `youtube shorts`, `tiktok`, `instagram reels`, or `twitter`. Default `youtube`. Drives title/desc limits and hashtag count. |
| `titleCount` | no | How many title variations to return, 1 to 15. Default 5. |
| `keywords` | no | Comma-separated SEO keywords to weave in where natural. |
| `language` | no | Output language. Default English. |
| `openaiApiKey` | yes | Your OpenAI key (bring-your-own). Marked secret. Can also be set via `OPENAI_API_KEY`. |
| `model` | no | Chat model, default `gpt-4o-mini`. |
| `baseUrl` | no | OpenAI-compatible base URL if you're routing through something else. |

### Output

One dataset record per input item. Each record has `platform`, `titles` (array), `description`, `hashtags` (array, `#`-prefixed, no spaces), `tags` (array of bare SEO keywords), and `pinnedComment`. Records also carry `ok` and the truncated `source`; if a single item fails the run keeps going and that record gets `ok: false` with an `error`.

### Example

```json
{
  "text": "A 60-second video explaining why cats knock things off tables, with funny examples.",
  "platform": "youtube shorts",
  "titleCount": 5,
  "keywords": "cat behavior, funny cats, pet tips",
  "language": "English",
  "openaiApiKey": "sk-..."
}
```

### Pricing

$0.015 per metadata pack (pay per result, no subscription). You also pay your own OpenAI usage on your key.

### Notes

A small `titleCount` (5) is a fine default. Pushing it to 15 spends more tokens for variations that start to repeat themselves. Pick the right `platform` before running, since switching it changes the limits the model writes to, not just a label.

# Actor input Schema

## `text` (type: `string`):

The video topic, title idea, or full script to generate metadata for.

## `sources` (type: `array`):

Array of strings OR objects (uses title/script/scriptText/text/selftext). Pipe the Script Rewriter / Reddit Scraper in.

## `platform` (type: `string`):

Platform to tune titles, limits, and hashtag counts for.

## `titleCount` (type: `integer`):

How many title variations to generate.

## `keywords` (type: `string`):

Comma-separated SEO keywords to weave in.

## `language` (type: `string`):

Output language.

## `openaiApiKey` (type: `string`):

Your OpenAI key. Kept private.

## `model` (type: `string`):

Chat model. Default gpt-4o-mini.

## `baseUrl` (type: `string`):

OpenAI-compatible base URL. Default https://api.openai.com/v1.

## Actor input object example

```json
{
  "text": "A 60-second video explaining why cats knock things off tables, with funny examples.",
  "platform": "youtube",
  "titleCount": 5,
  "language": "English",
  "model": "gpt-4o-mini"
}
```

# Actor output Schema

## `results` (type: `string`):

Result rows / metadata are stored in the default dataset (one row per item).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "text": "A 60-second video explaining why cats knock things off tables, with funny examples."
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/social-metadata-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "text": "A 60-second video explaining why cats knock things off tables, with funny examples." }

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/social-metadata-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "text": "A 60-second video explaining why cats knock things off tables, with funny examples."
}' |
apify call dami_studio/social-metadata-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dami_studio/social-metadata-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZpAzfifRKYvz6tEhc/builds/3AC0sKaa8aCH0LVfA/openapi.json
