# EGC Tracker API: guide for agents

EGC Tracker is a read-only database of which tech companies win X (Twitter) through posts by their founders and employees ("employee-generated content"). Use it to find winning posts and angles, the accounts behind them, and how a whole team runs its X presence.

Human docs: https://egctracker.com/docs · OpenAPI: https://egctracker.com/openapi.json

## Call basics

- Base URL: `https://egctracker.com/api/v1`
- Auth: `Authorization: Bearer <key>`. Keys are free: `POST /v1/keys` with `{"email": "..."}` or the form at https://egctracker.com/docs. Without a key you get 50 requests a day per address; with one, 2,000 a day. `GET /v1/me` shows what is left. `/v1/me` and `/v1/lookup` are not counted.
- Every call is `GET` and returns JSON. Success: `{ "data": ..., "meta": {...}, "requestId": "req_..." }`. Failure: `{ "error": { "code": "...", "message": "...", "requestId": "req_..." } }`. Branch on `error.code` (`invalid_request`, `not_found`, `invalid_api_key`, `rate_limited`, `data_unavailable`, `internal_error`), not on the message.
- `since` is `24h`, `7d` or `30d`. Lists take `limit` (1 to 100, default 20) and `offset`. Sorting is `sortBy` plus `order` (`desc` by default).
- `meta.dataUpdatedAt` is when the data was last refreshed. Say this date when you report "right now" numbers. If a 24h window comes back thin, widen to 7d.
- Fields are camelCase. Views are public X view counts on original and quote posts (not replies or reposts).

## Routing rule

When the user names a company, person or market, call `GET /v1/lookup?q=<name or @handle>` first and use the `id` it returns. Team ids are slugs such as `whop`, `ramp`, `cursor`. Market ids come from `GET /v1/markets` (for example `fintech`, `coding`, `ai-infra`, `creator`, `marketing`).

## Which endpoint

| The user wants | Call |
|---|---|
| "What is working right now (in my market)?" | `GET /v1/posts/winning?market=<id>&since=7d` |
| Breakouts from accounts their own size | `GET /v1/posts/winning?sortBy=outlier&minFollowers=1000&maxFollowers=10000` |
| Hooks, openings and formats that win | `GET /v1/hooks?market=<id>` |
| "How does <company> do it, A to Z?" | `GET /v1/teams/<slug>` |
| A team's posts | `GET /v1/teams/<slug>/posts?since=7d&sortBy=outlier` |
| "What changed for the teams I track?" | `GET /v1/digest?teams=a,b,c&since=24h` (or `/v1/teams/<slug>/digest`) |
| Which companies are growing | `GET /v1/companies?market=<id>&sortBy=growth7d` |
| Accounts doing well | `GET /v1/people?market=<id>&since=7d&sortBy=views` |
| One person | `GET /v1/people/<handle>` |

## Reading the data

- `timesTheirUsual` is a post's views divided by the author's own typical post. 5 means five times their normal. It is the fairest way to compare accounts of different sizes. `sortBy=outlier` ranks by it.
- `opening` is how the post starts (Launch, Numbers, Personal story, Hot take, How-to, Customer proof, Hiring, One-liner), read from the first words. `whyItWorked` appears only on the posts a team breakdown analysed (`postsToStudy`).
- `growth7dPct` compares the last 7 days with the 7 before. It is `null` when the earlier week was too small to compare.
- `/v1/posts/winning` and `/v1/hooks` hold each window's biggest posts and biggest outliers, not every post. Posts that look promoted (huge views, almost no likes) are left out.
- `/v1/teams/<slug>` returns: the team's numbers, `strategy` (headline, plays, whatToSteal, postTemplates, formats, openings), `activity` (how many people post, how concentrated the reach is), the full `roster` and `postsToStudy`.

## Recipes

**Hook lab.** `GET /v1/hooks?market=<id>&since=7d`, then `GET /v1/posts/winning?market=<id>&since=7d&sortBy=outlier&limit=30`. Group by `opening` and `format`, keep the patterns that appear in three or more outliers from different companies, and quote the exact first line of each example.

**Competitor watch.** Once a day: `GET /v1/digest?teams=<slugs>&since=24h`. Report each team's `breakouts` and `topPeople`. If nothing is new, say so and stop.

**Weekly niche scan.** `GET /v1/companies?market=<id>&sortBy=growth7d&limit=10`, `GET /v1/people?market=<id>&since=7d&limit=20`, `GET /v1/posts/winning?market=<id>&since=7d&limit=30`. Summarise who rose, which posts did it, and what they have in common.

**Accounts my size.** `GET /v1/posts/winning?market=<id>&since=7d&sortBy=outlier&minFollowers=<half of mine>&maxFollowers=<three times mine>`.

**Track a team A to Z.** `GET /v1/teams/<slug>` once for the playbook, then `GET /v1/teams/<slug>/digest?since=24h` daily for what changed.

## Limits and traps

- Read-only. There are no write endpoints and no webhooks: poll the digest once a day.
- Do not invent posts or numbers. Everything you report should come from a response, with the post `url`.
- Views show reach, not revenue. Do not claim a post produced customers.
- Rosters come from each company's official X affiliates and public bios, so a person may be missing.
- A `429` means the daily allowance is used; read `Retry-After` and stop until then.
