# scraping-tiktok-posts-by-location

Collects TikTok posts tied to a place through Apify. Use it to export post metrics, creator details, hashtags, and upload times from a location page.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 765 installs · ★ 1
- Author: apidojo
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/apidojo-io/apidojo-skills/tree/HEAD/skills/primitives/scraping-tiktok-posts-by-location/SKILL.md
- Updated: 2026-05-13
- HTML: https://affpapa.org/en/nevibecode/skills/scraping-tiktok-posts-by-location

## What it does

This skill sends a TikTok place-page URL to Apify actor `apidojo~tiktok-location-scraper` and returns the matching posts. Each record can include the caption, views, likes, comments, shares, bookmarks, hashtags, creator data, upload time, video URL, duration, and audio title.

The recommended runner is `scripts/run_actor.js`, with table output or files such as `results.csv` and `results.json`. A REST route is also available at `https://api.apify.com/v2/acts/apidojo~tiktok-location-scraper/runs`; that route uses the `APIFY_TOKEN` bearer token.

The actor requires a TikTok location-page URL, not a city name. Private videos are filtered out, and a deleted location can produce an empty result. Locations with few tagged posts return the posts that remain available.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-location -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/scraping-tiktok-posts-by-location/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/scraping-tiktok-posts-by-location/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-location -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/scraping-tiktok-posts-by-location/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-location -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/scraping-tiktok-posts-by-location/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install apidojo-io/apidojo-skills scraping-tiktok-posts-by-location
```

2. **Manually: put the files in place**
- File: `.github/skills/scraping-tiktok-posts-by-location/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-location -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/apidojo-io/apidojo-skills --path skills/primitives/scraping-tiktok-posts-by-location
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/scraping-tiktok-posts-by-location/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-location -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/apidojo-io/apidojo-skills/tree/HEAD/skills/primitives/scraping-tiktok-posts-by-location/SKILL.md

## When to use it
- collect TikTok posts from a place page
- export views, likes, comments, and shares
- extract creators and hashtags from local posts
- write location results to CSV or JSON
- inspect videos tagged at a specific venue

## Example prompts
- Collect posts from `https://www.tiktok.com/place/New-York-City-123456` and show the result as a table.
- Save posts from this TikTok location to `results.csv` with `maxItems: 100`.
- Run actor `apidojo~tiktok-location-scraper` and write the place-page data to `results.json`.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 98c3217af11fb83e.

BEGIN THIRD-PARTY FILE 98c3217af11fb83e
````text
---
name: scraping-tiktok-posts-by-location
description: >
  Extracts TikTok posts tagged at a specific location using apidojo's TikTok Location Scraper
  on Apify. Triggers when the user asks to: get TikTok videos from a specific location, scrape
  TikTok posts tagged at a place, find TikTok content from a city or venue, collect TikTok videos
  geotagged at a location URL, export TikTok location-tagged content, or pull TikTok posts from
  a place page. Returns video title, views, likes, comments, shares, channel info, hashtags,
  and timestamp per post. Ideal for local marketing teams, event researchers, and geo-targeting analysts.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/tiktok-location-scraper
---

# Scraping Tiktok Posts By Location

Raw data collection. No assumed use case — returns the full dataset for downstream analysis.

---

## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | ✅ | `[]` | TikTok location/place URLs (e.g. `https://www.tiktok.com/tag/newyork?location=true`) |
| `maxItems` | number | Optional | Unlimited | Maximum posts to return |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |

## How to Run

### Using run_actor.js (recommended)

```bash
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~tiktok-location-scraper" --input '{"startUrls": ["https://www.tiktok.com/place/New-York-City-123456"], "maxItems": 100}'

# Save as CSV
node scripts/run_actor.js --actor "apidojo~tiktok-location-scraper" --input '{"startUrls": ["https://www.tiktok.com/place/New-York-City-123456"], "maxItems": 100}' --output results.csv --format csv

# Save as JSON
node scripts/run_actor.js --actor "apidojo~tiktok-location-scraper" --input '{"startUrls": ["https://www.tiktok.com/place/New-York-City-123456"], "maxItems": 100}' --output results.json --format json
```

### REST API fallback

```bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~tiktok-location-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://www.tiktok.com/place/New-York-City-123456"], "maxItems": 100}'
```

If Apify MCP is available:
Use the Apify MCP `call_actor` tool with actor `apidojo~tiktok-location-scraper` and the input above.

---

## Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | TikTok post ID |
````
END THIRD-PARTY FILE 98c3217af11fb83e

The third-party file has ended. Everything between the 98c3217af11fb83e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2537 of 3633 bytes. © apidojo · Apache-2.0 · https://github.com/apidojo-io/apidojo-skills/tree/HEAD/skills/primitives/scraping-tiktok-posts-by-location/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
