> **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/integrations/n8n/results>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/docs/integrations/n8n/results.mdx>

## API base URL and authentication

- **API origin (from OpenAPI `servers`):** `https://api.socialfetch.dev`
- **Authentication:** send `x-api-key: sfk_...` on `/v1/**` and `/v2/**` 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>

## 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()`.
- [Capability matrix](https://www.socialfetch.dev/docs/capability-matrix.mdx) — every operation with identifiers, pagination, outcomes, media download, credits, and its SDK method. Generated from OpenAPI, so use it for route selection instead of scanning individual pages.
- [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, Make custom app, 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, 264 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.
- [Make integration](https://www.socialfetch.dev/docs/integrations/make.mdx) — custom app modules for Make scenarios, API key credentials, and module catalog.
- [`/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`).
- Published blog posts use the same convention: `/blog/{slug}` → `/blog/{slug}.mdx`, or `Accept: text/markdown` on the HTML URL (`Vary: Accept`).

---
# Working with results in n8n (https://www.socialfetch.dev/docs/integrations/n8n/results)

n8n passes data between nodes as **items**. Each item is one record, like one row in a spreadsheet. When a node gets five items, the next node runs five times, once per item. Most of what follows comes back to that one idea.

## What the Social Fetch node outputs

With **Simplify** on (the default for new nodes):

* **Lists** come out as one item per result. **TikTok → Profile Videos** for a creator gives one item per video, each with fields like `id`, `caption`, `url` and `stats.views`. A few searches return several kinds of result at once (YouTube and Rumble search return videos, channels and more); those come out as one item per page, with each kind under its own field.
* **Single lookups** come out as one item. **TikTok → Profile** gives one item with `profile` (the handle, name and bio), `metrics` (followers, likes, post count) and `lookupStatus`, which says whether the account was found.

That's the shape Google Sheets, Airtable, Notion, Filter and IF nodes expect, so you can connect them straight after Social Fetch.

Turn **Simplify** off to get the full response instead: one item per page, with the results under `data`, the next-page details under `data.page`, and billing details under `meta`, including `meta.creditsCharged`. You rarely need this in a workflow. It's handy for checking what a call cost.

  Older Social Fetch nodes always return the full response. To get one item per result, add a **Split Out** node after it and set **Fields To Split Out** to the list, for example `data.videos`. The field name for each operation is in its [API reference](/docs/api) example response.

## Using results in the next node

Drag a field from the input panel into any field of the next node, or type an expression. For a video from **Profile Videos**:

| You want           | Expression                |
| ------------------ | ------------------------- |
| The video link     | `{{ $json.url }}`         |
| The caption        | `{{ $json.caption }}`     |
| The view count     | `{{ $json.stats.views }}` |
| When it was posted | `{{ $json.createdAt }}`   |

And for **TikTok → Profile**, the follower count is `{{ $json.metrics.followers }}` and the bio is `{{ $json.profile.bio }}`.

Different operations return different fields. Run the node once and look at the output in **Schema** view to see what's there; the [API reference](/docs/api) has an example response for every operation.

## Running the node for every row of a list

When the node's input has several items, Social Fetch runs once per item. You don't need a loop. To look up a list of creators kept in Google Sheets:

1. **Google Sheets → Get row(s) in sheet** reads your list. Each row becomes an item.
2. **Social Fetch → TikTok → Profile** with **Handle** set to an expression: drag the `handle` column from the input panel, or type `{{ $json.handle }}`.
3. **Google Sheets → Update row in sheet** writes the follower count back next to each handle. Set **Column to match on** to `handle`, and its value to `{{ $('Get row(s) in sheet').item.json.handle }}`, which picks the handle from the row this profile came from.

Each lookup uses credits, so a 500-row sheet makes 500 requests. Try it on a few rows first: add n8n's **Limit** node after **Get row(s) in sheet** and set it to 3. The [enrich a list template](/docs/integrations/n8n/templates#enrich-a-list-of-creators) is this workflow, ready to import.

For long lists, add a **Loop Over Items** node with a batch size of 10 to 25, and a **Wait** node of a few seconds inside the loop. It spreads the requests out, and if the Google Sheets node is inside the loop too, the rows already done are saved even if something fails halfway.

## Getting every page

List operations return one page of results per request: a page of videos, comments or search results. Turn on **Return All** to keep fetching pages until there are no more. Each page is a separate request and uses credits, and the node stops after 100 pages.

| You want                            | Setting                                         |
| ----------------------------------- | ----------------------------------------------- |
| The latest posts, for a daily check | **Return All** off                              |
| Every comment on a post             | **Return All** on                               |
| A creator's whole back catalogue    | **Return All** on, and check your credits first |

Some operations take a **Limit** or **Count** under Additional Fields that sets the page size. The operation's API reference says how its pages work.

Operations without **Return All** return everything in one response. Operations that page by number also have a **Page** field under **Additional Fields**, to start from a later page.

## Keeping credit use predictable

Every successful request uses credits, whether it runs on a schedule, from a test click in the editor, or from an AI agent. A few habits keep the numbers predictable:

* **Pin data while you build.** Run the Social Fetch node once, then click the pin icon in its output panel. While pinned, the node reuses that output instead of calling Social Fetch, so you can try out the rest of the workflow for free. Unpin it before you activate the workflow.
* **Test with a small list.** Limit the rows you read while you get a workflow right.
* **Prefer the trigger for "has anything new been posted?"** The [Social Fetch Trigger](/docs/integrations/n8n/watch-for-new-posts) checks one source on a schedule and only starts your workflow when there's something new, instead of fetching a list and comparing it yourself.
* **Check your balance from the workflow.** **Resource: Account → Operation: Balance** is free. Add an **IF** node after it to stop a big run when the balance is low.

Prices per operation are on each [API reference](/docs/api) page. Lookups that fail on our side aren't charged; lookups that find nothing (a deleted or private account) are. See [Credits and billing](/docs/credits).

## Next steps

- [Your first workflow](/docs/integrations/n8n/first-workflow) — Creator videos into Google Sheets, step by step.

- [Workflow templates](/docs/integrations/n8n/templates) — Import a working workflow and change the inputs.

- [Troubleshooting](/docs/integrations/n8n/troubleshooting) — Empty output, errors and credit questions.