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

# Export a Shortlist to CSV

> Run a bounded creator search and save names, handles, scores, and reasons for spreadsheet review

Save a creator shortlist to CSV for spreadsheet review. This recipe makes one search request, uses the returned profile summaries, and does not make additional calls for each creator.

## Run the export

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

```typescript theme={null}
import { writeFile } from 'node:fs/promises';
import { existsSync } from 'node:fs';
import Influship from 'influship';

const query = process.argv.slice(2).join(' ').trim();
if (query.length < 3 || query.length > 500) {
  throw new Error('Supply a campaign brief between 3 and 500 characters.');
}

function cell(value: string | number | null): string {
  let text = value === null ? '' : String(value);
  // Prevent creator data from becoming a spreadsheet formula.
  if (/^\s*[=+\-@]/.test(text)) text = `'${text}`;
  return `"${text.replaceAll('"', '""')}"`;
}

if (existsSync('creator-shortlist.csv')) {
  throw new Error('Move the existing creator-shortlist.csv before another search.');
}

const client = new Influship({ maxRetries: 0 });
const { data: search, response } = await client.search.create({
  query, platforms: ['instagram'], limit: 5,
}).withResponse();

const header = ['Name', 'Handle', 'Followers', 'Engagement %', 'Score',
  'Ranking source', 'Location unverified', 'Low confidence', 'Reasons'];
const rows = search.data.map((item) => {
  const profile = item.relevant_profile ?? item.primary_profile;
  return [item.creator.name, profile?.username ?? null,
    profile?.followers ?? null, profile?.engagement_rate ?? null,
    item.match.score, item.match.ranking_source ?? 'reranked',
    String(item.location_unverified), String(item.match.low_confidence),
    item.match.reasons.join('; ')];
});
const csv = [header, ...rows].map((row) => row.map(cell).join(',')).join('\r\n');
await writeFile('creator-shortlist.csv', csv, { flag: 'wx' });
console.log(`Saved ${rows.length} creators to creator-shortlist.csv`);
console.log('Credits charged:', response.headers.get('x-credits-charged'));
```

```bash theme={null}
node --experimental-strip-types export-shortlist.ts \
  'Home workout creators who teach beginners using minimal equipment'
```

The file uses exclusive creation so you do not accidentally replace an earlier export. Move or rename an existing `creator-shortlist.csv` before another run. Each run creates a new search and consumes credits; reopening the CSV does not.

## Review the file

An illustrative CSV using **synthetic example data** begins:

```csv theme={null}
"Name","Handle","Followers","Engagement %","Score","Ranking source","Location unverified","Low confidence","Reasons"
"Alex Example","alex_example","42000","3.1","0.87","reranked","false","false","Creates approachable home workout tutorials"
```

Unavailable metrics are blank. An observed zero remains zero. The export quotes commas, double quotes, and line breaks, and escapes spreadsheet formula prefixes in creator-supplied text.

Keep ranking source, confidence, and location verification columns when sharing results. Search relevance is not a prediction of campaign performance. See [Match Reasons](/concepts/match-reasons).

## Cost and next steps

Five delivered results cost 35 credits (\$0.35). There is no export surcharge or profile expansion cost. This example does not automatically fetch more pages; see [Pagination](/guides/pagination) if your application needs a larger result set.

Use [Compare Creators for a Campaign](/cookbook/compare-creators) for a second review against a campaign brief, or [Build a Creator Search App](/cookbook/creator-search-nextjs) for the browser version with a CSV button.

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 related workflows.


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