> **For coding agents and LLMs:** This is one page from the Social Fetch docs (markdown export). For curated orientation and workflow guidance, start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for agent onboarding and crawl rules, use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for the full endpoint list with links to pages like this one, use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt); for one platform's parameters and curls, use [`/llms-{platform}.txt`](https://www.socialfetch.dev/llms-tiktok.txt); use [`/llms.json`](https://www.socialfetch.dev/llms.json) when you need structured JSON for tool registration.

## This page

- **On-site (HTML):** [https://www.socialfetch.dev/docs/monitors/quickstart](https://www.socialfetch.dev/docs/monitors/quickstart)
- **Markdown (.mdx) URL:** [https://www.socialfetch.dev/docs/monitors/quickstart.mdx](https://www.socialfetch.dev/docs/monitors/quickstart.mdx)

## API base URL and authentication

- **API origin (from OpenAPI `servers`):** `https://api.socialfetch.dev`
- **Authentication:** send `x-api-key: sfk_...` on `/v1/**` routes unless the operation is explicitly anonymous (check OpenAPI `security`, the [API reference hub](https://www.socialfetch.dev/docs/api.mdx), [`/llms.txt`](https://www.socialfetch.dev/llms.txt), or [`/llms.json`](https://www.socialfetch.dev/llms.json) for each route).
- **OpenAPI JSON:** [https://www.socialfetch.dev/openapi.json](https://www.socialfetch.dev/openapi.json)

## Recommended docs entrypoints (this site)

- [Documentation overview](https://www.socialfetch.dev/docs.mdx) — top-level orientation (markdown).
- [Quickstart](https://www.socialfetch.dev/docs/quickstart.mdx) — authenticate with `x-api-key`, validate auth with `whoami`, and understand the JSON envelope.
- [SDK](https://www.socialfetch.dev/docs/sdk.mdx) — official TypeScript SDK guide, including `SocialFetchClient`, `Result`, and `unwrap()`.
- [SDK reference](https://www.socialfetch.dev/docs/sdk-reference.mdx) — exhaustive SDK method inventory and route mapping for agents, tooling, and power users.
- [Choose the right endpoint](https://www.socialfetch.dev/docs/choose-endpoint.mdx) — task-oriented route selection for smoke tests, profiles, list endpoints, and single-item lookups.
- [Capability matrix](https://www.socialfetch.dev/docs/capability-matrix.mdx) — fast comparison of identifiers, pagination, outcomes, media download, and SDK coverage.
- [Recipes](https://www.socialfetch.dev/docs/recipes.mdx) — copyable workflows (brand monitoring, transcripts, Ad Library, creator scoring, Reddit research) with credit callouts and SDK examples.
- [Integrations](https://www.socialfetch.dev/docs/integrations.mdx) — MCP for AI clients, n8n verified node, Apify Store Actors, SDK, and REST API connection paths.
- [MCP product page](https://www.socialfetch.dev/mcp) — hosted MCP overview, OAuth, Skills install.
- [MCP integration](https://www.socialfetch.dev/docs/integrations/mcp.mdx) — hosted `/mcp` server, OAuth, Cursor/VS Code/Claude install snippets, 162 endpoint tools, plus docs_search/docs_read for implementation help.
- [n8n integration](https://www.socialfetch.dev/docs/integrations/n8n.mdx) — install `n8n-nodes-socialfetch`, credentials, and workflow examples.
- [Apify integration](https://www.socialfetch.dev/docs/integrations/apify.mdx) — Store Actors under @social-fetch, PPE billing, dataset export, and quick start.
- [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt) — every documented operation with a direct link to that route's agent-readable markdown page (prefer this over parsing OpenAPI).
- [`/llms-{platform}.txt`](https://www.socialfetch.dev/llms-tiktok.txt) — per-platform endpoint files generated from OpenAPI (parameters, credits, curls).
- [`/agents.txt`](https://www.socialfetch.dev/agents.txt) — agent crawl/onboarding file with capabilities, auth rules, and allowlist.
- [`/llms.json`](https://www.socialfetch.dev/llms.json) — structured machine-readable operation inventory with parameter names, pagination, outcomes, credits, and SDK mapping.
- [API reference hub](https://www.socialfetch.dev/docs/api.mdx) — human-friendly index of operations with links into generated pages.
- [Errors](https://www.socialfetch.dev/docs/errors.mdx) — shared error envelope and HTTP status guidance.
- [Credits](https://www.socialfetch.dev/docs/credits.mdx) — metering, `402`, and planning batch jobs.
- Outcome semantics such as `found`, `not_found`, and `private` are documented in [Errors](https://www.socialfetch.dev/docs/errors.mdx) and on operation pages when present in the OpenAPI contract.

## Markdown docs convention

- Every docs page has a markdown twin: append **`.mdx`** to the docs pathname (for example `/docs/quickstart` → `/docs/quickstart.mdx`).
- Agents that send `Accept: text/markdown` on `/docs/**` HTML URLs may receive markdown directly (same URL, `Vary: Accept`).

---
# Monitoring quickstart (https://www.socialfetch.dev/docs/monitors/quickstart)

Poll a watchable Social Fetch source and get a signed webhook when something new appears.

## Before you start

* **API key:** create one in [API Keys](https://app.socialfetch.dev/api-keys). Monitors need an API key (no anonymous x402 access) so polls can run against a durable account.
* **Base URL:** `https://api.socialfetch.dev`
* **Cost:** create/list/update/delete for monitors and webhook endpoints is free. Only the scheduled poll bills, at that operation's normal per-request price. See [Billing for monitors](/docs/monitors/billing).
* Or use the [dashboard wizard](https://app.socialfetch.dev/monitors/new), which includes a one-click test inbox.

## 1. Save your API key

Put the key in an environment variable. Use `.env` for app code, or export it in your shell for one-off requests.

## 2. Discover what you can watch

`GET /v1/monitors/sources` lists every watchable operation, its display name, how it detects new items, and a sample event:

```json
{
  "data": {
    "sources": [
      {
        "operationId": "twitter.profile.tweets.list",
        "displayName": "New tweets from a profile",
        "mode": "feed",
        "defaultIntervalMinutes": 15,
        "minIntervalMinutes": 1,
        "docsTitle": "List a Twitter/X profile's tweets",
        "sampleEvent": { "...": "..." }
      }
    ]
  }
}
```

Pick an `operationId` and note `minIntervalMinutes` — the fastest that source will poll (currently 1 minute for every watchable source).

## 3. Create a test inbox (no public URL needed)

A **sink endpoint** has a signing secret and logged deliveries, but instead of an outbound HTTP call it captures the signed request for you to inspect:

```json
{
  "data": {
    "id": "whe_01J9example",
    "kind": "sink",
    "url": null,
    "description": "quickstart",
    "secret": "sfwh_...shown once, store it now..."
  }
}
```

  `secret` is only returned on creation (or explicit rotation). Store it now — you'll need it to verify deliveries.

## 4. Create the monitor

Point the monitor at the source, a schedule, and the sink from step 3. Add `?dryRun=true` first if you only want the cost preview:

```json
{
  "data": {
    "id": "mon_01J9example",
    "name": "@elonmusk tweets",
    "operationId": "twitter.profile.tweets.list",
    "params": { "handle": "elonmusk" },
    "schedule": { "type": "interval", "minutes": 15 },
    "nextRunAt": "2026-07-30T12:15:00Z",
    "costPreview": { "perCheckCredits": 2, "perDayCredits": 192, "perMonthCredits": 5760 },
    "baseline": { "outcome": "found", "previewItems": ["..."] },
    "webhookEndpoint": null
  }
}
```

Creation runs a synchronous **baseline check**. It charges one poll, records what already exists so those items don't fire events, and returns a preview of what it saw.

## 5. Trigger a check without waiting

Triggering is free; the poll it enqueues bills the normal per-check price (rate-limited to once per 60 seconds per monitor):

```json
{ "data": { "triggered": true } }
```

If the target has posted something new since the baseline, a signed delivery lands on your sink within seconds.

## 6. Read the captured delivery

Each delivery includes the exact `requestHeaders` and `payloadText` that would have been POSTed to a real URL — byte-identical, so you can verify the signature the same way as in production. See [Receiving & verifying webhooks](/docs/monitors/webhooks).

## 7. Point it at your real endpoint

When your handler is ready, swap the sink for your URL. Nothing else about the monitor changes:

## Where to go next

- [Receiving & verifying webhooks](/docs/monitors/webhooks) — Next.js, Hono, and Express handlers — and the raw-body gotcha that breaks signature checks.

- [Testing webhooks locally](/docs/monitors/testing-locally) — socialfetch listen forwards signed events to localhost. No tunnel.

- [Delivery, retries & idempotency](/docs/monitors/delivery-retries) — Retry schedule, at-least-once delivery, and deduping on event id.

- [Billing for monitors](/docs/monitors/billing) — Per-check credits × schedule, dryRun previews, and plan limits.