> ## 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.

# Map a niche

> Builds the research set for a market: qualified accounts across size bands, each with the posts that prove it belongs, clustered by content territory. Use when entering a niche, scoping a campaign's creator universe, or building the account list a content strategy starts from.

This cookbook builds the map a strategy starts from: who publishes in the niche, at what size, doing what. 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/map-a-niche.md and execute the
cookbook it contains with my context:

- niche: [the market, e.g. dog grooming]
- bands: [optional follower bands; default 1,000 to 10,000, 10,000 to
  100,000, and 100,000 to 1,000,000]
- location or language: [optional constraints]
```

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

| Input                   | What it is                          | Required           | Source                 |
| ----------------------- | ----------------------------------- | ------------------ | ---------------------- |
| `niche`                 | The market to map, in plain words   | yes                | operator               |
| `bands`                 | Follower ranges structuring the map | no; defaults above | operator               |
| `location` / `language` | Structural constraints              | no                 | operator               |
| `KLINT_API_KEY`         | API key                             | yes                | operator's environment |

## Objectives

Produce exactly one artifact: a niche map organized by band and content territory, every account carrying its evidence posts, in the Output format below. Nothing else counts as done.

## Procedure

<Steps>
  <Step title="Qualify the roster, one search per band">
    `POST https://api.tryklint.ai/v1/instagram/accounts/search`, once per follower band. The identity query plus a recent-proof requirement keeps bio-only accounts out.

    ```json theme={null}
    {
      "account": {
        "query": "[the niche as publishing identity, e.g. accounts that regularly publish dog grooming content]",
        "filters": {
          "followers_count": { "gte": 10000, "lte": 100000 }
        },
        "posts": {
          "minimum_matching_posts": 3,
          "filters": {
            "posted_at": { "gte": "[90 days ago, RFC 3339]" }
          }
        }
      },
      "limit": 15
    }
    ```

    Add `declared_locations` or `publishing_languages` filters only if the operator constrained them. Accounts that never declared a location can't match a location filter; note that in Scope if it applies.
  </Step>

  <Step title="Sample each account's publishing">
    For the accounts that appear on the map, a handle-scoped sample of their strongest recent work. Filters-only searches may sort.

    ```json theme={null}
    {
      "post": {
        "filters": {
          "posted_at": { "gte": "[90 days ago]" }
        },
        "author": {
          "filters": { "handle": { "in": ["[handle]"] } }
        }
      },
      "sort": { "by": "views", "order": "desc" },
      "limit": 5
    }
    ```
  </Step>

  <Step title="Cluster by content territory">
    No API call. Group accounts by what they actually publish, using the topics and creative formats already on their posts: the recurring subject-plus-style combinations that make territories. Name each territory in plain words. An account can sit in two territories; most sit in one.
  </Step>

  <Step title="Verify before you report">
    Check against the Objectives. Every account on the map has three or more qualifying posts behind it. Each territory assignment cites post IDs. Report a band with few qualifying accounts as thin; do not pad it. Coverage is what Klint tracks; recommend widening before anyone concludes the niche is empty.
  </Step>
</Steps>

## Output format

Use exactly this structure:

```markdown theme={null}
# Niche map: [niche], [date]

## [Band, e.g. 10K to 100K]
### [Territory name, e.g. transformation grooming]
- @[handle] ([followers]): [one line on their angle] (posts: [IDs])
- @[handle] ...

### [Territory name] ...

## Read of the map
[One paragraph: where accounts concentrate, which territories are thin,
what that suggests about the niche's structure. Observations, not
predictions.]

## Scope
[Bands searched, constraints applied, thin bands, tracking caveats.]
```

## Boundaries

* The map describes publishing identity: what accounts make, at what size. It says nothing about audiences, reach, or demographics.
* Territory names are your clustering judgment; the three-post qualification floor is not.
* A thin band or territory within what Klint tracks is a finding to report, not a gap to fill with weaker accounts.
