> ## Documentation Index
> Fetch the complete documentation index at: https://tryklint.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Fetch /llms.txt for the complete page index before exploring further. Every docs page is available as markdown by appending .md to its URL. Coding agents should start at /for-agents/coding-agents.md.

# Find trending hooks

> Sweeps a niche's recent Instagram posts, separates repeated hook patterns from one-off outliers, and returns a testable content brief with receipts. Use when deciding what to make this week, researching trending hooks, or briefing a content team.

This cookbook turns "what's working in our niche this week?" into a brief your team can act on. You don't run it; your agent does.

## Run it

Paste this to your agent, filled in:

```text theme={null}
Fetch https://tryklint.ai/cookbooks/find-trending-hooks.md and execute
the cookbook it contains with my context:

- niche: [your market, e.g. dog grooming]
- window: [how far back to look; default the last 7 days]
- audience band: [author follower range, e.g. 5,000 to 500,000]
```

The URL carries everything your agent needs. Everything below this line addresses the agent executing it.

## Context for the agent

Klint is the social context API: it searches and extracts Instagram posts and accounts, returned with transcripts, on-screen text, and creative structure already analyzed. Base URL `https://api.tryklint.ai`. Every request needs `Authorization: Bearer $KLINT_API_KEY`; never print or echo the key. This page is the source of truth for this procedure; work from the fetched copy, not memory. The full documentation index is at `https://tryklint.ai/llms.txt`, and the whole API contract is at `https://tryklint.ai/for-agents/coding-agents.md`. Last updated July 18, 2026.

## Inputs

Verify you have all of these before calling the API. If any are missing, ask your operator; don't guess.

| Input           | What it is                                                                             | Required                     | Source                 |
| --------------- | -------------------------------------------------------------------------------------- | ---------------------------- | ---------------------- |
| `niche`         | The market to sweep, as a plain description; a Klint niche ID if the operator knows it | yes                          | operator               |
| `window`        | How far back to look                                                                   | no; default 7 days           | operator               |
| `audience band` | Author follower range matching the operator's league                                   | no; default 5,000 to 500,000 | operator               |
| `KLINT_API_KEY` | API key                                                                                | yes                          | operator's environment |

## Objectives

Produce exactly one artifact: a brief containing two to four hook patterns, each backed by three or more independent accounts, in the Output format below. Nothing else counts as done.

## Procedure

<Steps>
  <Step title="Sweep the window's relevant posts">
    Both sweeps are `POST https://api.tryklint.ai/v1/instagram/posts/search`. Compute the window start as an RFC 3339 timestamp before building the request. Use the operator's niche two ways at once. Use it as the semantic `query` (phrased as content, not keywords) and as the author `niches` filter.

    ```json theme={null}
    {
      "post": {
        "query": "[the niche as content, e.g. grooming tips and tutorials for dog owners]",
        "filters": {
          "posted_at": { "gte": "[window start]" },
          "format": { "in": ["reel"] }
        },
        "author": {
          "filters": {
            "niches": { "contains_any": ["[niche ID]"] },
            "followers_count": { "gte": 5000, "lte": 500000 }
          }
        }
      },
      "limit": 50
    }
    ```

    Each result already carries its hook, topics, and creative format. If Klint rejects the niche ID, the error lists valid candidates. Pick the closest. Note the substitution in your brief.
  </Step>

  <Step title="Pull the window's outperformers">
    A second, structural sweep: posts beating their own account's baseline, whatever their topic. Two constraints before you build it. Filters-only searches may sort, but `sort` and `query` never appear together. `view_ratio_to_account_baseline` only exists for accounts with enough history, so this sweep undercounts very new accounts. Don't read absence as failure.

    ```json theme={null}
    {
      "post": {
        "filters": {
          "posted_at": { "gte": "[window start]" },
          "view_ratio_to_account_baseline": { "gte": 2.0 }
        },
        "author": {
          "filters": { "niches": { "contains_any": ["[niche ID]"] } }
        }
      },
      "sort": { "by": "views", "order": "desc" },
      "limit": 25
    }
    ```
  </Step>

  <Step title="Extract the strongest candidates">
    For the top posts across both sweeps, `GET https://api.tryklint.ai/v1/instagram/posts/{id}`. The full post carries the transcript, on-screen text, hook construction, key messages, and offer. Compare how posts open and how they're built, not just what they're about.
  </Step>

  <Step title="Cluster, then count distinct accounts">
    No API call. Group posts by hook construction and creative format. Then apply the survival rule: **one viral post is noise**. A pattern only enters the brief if it appears across three or more independent accounts. Judgment is yours on cluster boundaries; the three-account floor is not.
  </Step>

  <Step title="Verify before you report">
    Check the artifact against the Objectives. Every pattern cites three or more accounts. Every claim links to post IDs from your responses. If no pattern survives, do not pad with weaker ones. Report the empty result and offer to widen the window or the band. An empty sweep means nothing qualified in this scope, not that the niche is quiet.
  </Step>
</Steps>

## Output format

Use exactly this structure:

```markdown theme={null}
# Hook brief: [niche], [window]

## Pattern 1: [name you give it]
- What it is: [one sentence: the hook construction and why it recurs]
- Who ran it: [@handle, @handle, @handle (minimum three)]
- Strongest example: [post ID + one line on execution]
- Weakest example: [post ID + one line on what drags]
- Test for your account: [one concrete variant to produce]

## Pattern 2: ...

## Scope
Searched [niche] from [window start], authors [band]. [Any substitutions,
empty sweeps, or undercounts worth knowing about.]
```

## Boundaries

* The brief describes what happened in the window. Never present a pattern as a prediction that it keeps working.
* Cite only posts returned by your own calls. No memory, no invention.
* If the operator asks for more than this page covers, fetch `https://tryklint.ai/llms.txt` and route from there.
