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

# Compare Creators for a Campaign

> Score known Instagram creators against a campaign brief without running a discovery search

Compare creators you already know by sending their Instagram handles directly to campaign matching. This recipe makes one match request and does not run a discovery search or a separate profile lookup.

## Set up

Install the [TypeScript SDK](/sdks) in a Node.js 22+ project and set `INFLUSHIP_API_KEY` in your environment. The [quickstart](/quickstart) walks through key creation and your first request. Save this code as `compare-creators.ts`:

```typescript theme={null}
import Influship from 'influship';

const handles = [...new Set(process.argv.slice(2)
  .map((handle) => handle.replace(/^@/, '').toLowerCase()))];

if (handles.length < 2 || handles.length > 10 ||
    handles.some((handle) => !/^[a-z0-9._]{1,30}$/.test(handle))) {
  throw new Error('Pass between 2 and 10 valid Instagram usernames.');
}

const client = new Influship({ maxRetries: 0 });
const { data: comparison, response } = await client.creators.match({
  creators: handles.map((username) => ({ platform: 'instagram', username })),
  intent: {
    query: 'Launch a plant-based protein bar with approachable nutrition content',
    context: 'The audience is busy adults who want practical snack ideas. '
      + 'Prioritize clear explanations and everyday routines.',
  },
}).withResponse();

const ranked = [...comparison.data].sort((a, b) => b.match.score - a.match.score);
for (const item of ranked) {
  console.log(`${item.creator.name}: ${item.match.decision} (${item.match.score})`);
  for (const reason of item.match.reasons) {
    console.log(`  [${reason.provenance}] ${reason.text}`);
    if (reason.evidence_quote) console.log(`    "${reason.evidence_quote}"`);
  }
}
console.log('Credits charged:', response.headers.get('x-credits-charged'));
```

Run the script with real usernames you want to compare:

```bash theme={null}
node --experimental-strip-types compare-creators.ts USERNAME_ONE USERNAME_TWO
```

Replace the two uppercase placeholders. The input list is capped at ten to keep this example's request bounded. A failed request exits the script; it is not automatically retried. See [Error Handling](/guides/error-handling) to add recovery for your application.

## Read the comparison

This output uses **synthetic example data**:

```text theme={null}
Alex Example: good (0.86)
  [profile_fact] Publishes practical nutrition tutorials.
Taylor Example: neutral (0.63)
  [inferred] General wellness content needs a closer campaign review.
```

The decisions are `good`, `neutral`, and `avoid`. Keep `neutral` results available for manual review. The score reflects this brief, not a creator's overall quality or expected campaign performance.

Match reasons are objects with a `text` field, unlike search reasons, which are strings. Preserve the `provenance` label when presenting reasons. `post_evidence` includes a supporting post reference; `profile_fact` rests on a profile fact; `inferred` is an inference. See [Match Reasons](/concepts/match-reasons).

## Cost and unresolved creators

Matching costs one credit (\$0.01) per creator scored. Comparing ten scored creators costs ten credits (\$0.10). Read the actual charge from `X-Credits-Charged` rather than assuming every input was scored. See [Pricing](/concepts/pricing).

Use handles that resolve to creators in the Influship index. Do not invent a score for a missing creator or treat a failed request as a weak match. If you need to inspect which handles resolve first, use [Score Campaign Fit for an Existing List](/cookbook/score-campaign-fit).

For credential, billing, rate-limit, and temporary failures, follow [Error Handling](/guides/error-handling). The script disables automatic retries; check the failure and the request budget before running it again. [Browse the cookbook](/cookbook) for discovery and export workflows.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.