# TikTok Profile Scraper POSTS (`scraping_solutions/tiktok-profile-scraper-posts`)

Extract data from TikTok profiles and videos they post. Get TikTok profile data, URLs, numbers of shares, followers, comments, hearts, video and music metadata. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.

- **URL**: https://apify.com/scraping\_solutions/tiktok-profile-scraper-posts.md
- **Developed by:** [Scraping Solutions](https://apify.com/scraping_solutions) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 5 total users, 5 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for dataset items the Actor outputs.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-result

# README

## TikTok Profile Scraper - Posts

Este actor permite **scrapear videos de perfiles de TikTok** usando usernames específicos. Los resultados incluyen información detallada de cada video, estadísticas y datos del autor.

***

### Input

El input debe enviarse como JSON y soporta los siguientes campos:

| Campo | Tipo | Descripción | Opciones | Valor por defecto |
|-------|------|-------------|----------|-----------------|
| `Profile(s)` | array de strings | Lista de usernames de TikTok que quieres scrapear. Se puede agregar uno por línea. | N/A | N/A |
| `Profile sections to scrape` | string | Si el perfil tiene videos repostados, puedes scrapearlos seleccionando `Reposts`. | `Videos`, `Reposts` | `Videos` |
| `Profile video sorting` | string | Orden de los videos del perfil. | `Simple`, `Popular`, `Oldest`, `Liked` | `Simple` |
| `Minimum post date` | string | Fecha mínima de publicación a incluir (YYYY-MM-DD). | N/A | N/A |
| `Maximum post date` | string | Fecha máxima de publicación a incluir (YYYY-MM-DD). | N/A | N/A |
| `Number of results by line` | integer | Número de videos a scrapear por perfil. Rango permitido: 1-200. | N/A | 50 |

**Ejemplo de input:**

```json
{
  "Profile(s)": ["taylorswift", "charlidamelio"],
  "Profile sections to scrape": "Videos",
  "Profile video sorting": "Latest",
  "minDate": "2025-10-01",
  "maxDate": "2025-10-10",
  "resultsLimit": 100
}
```

***

### Output

El actor devuelve un **array de objetos JSON**, cada uno representando un video:

| Campo | Tipo | Descripción |
|-------|------|------------|
| `type` | string | Tipo de contenido, siempre `"Videos"` |
| `search` | string | Username del perfil |
| `video_id` | string | ID único del video |
| `link_post` | string | URL directa del video |
| `desc` | string | Descripción del video |
| `post_date` | string | Fecha de publicación (YYYY-MM-DD HH:MM:SS) |
| `create_time` | integer | Timestamp de creación |
| `text_language` | string | Idioma detectado del texto |
| `is_ad` | boolean | Indica si es contenido promocionado |
| `hashtags` | array | Hashtags del video |
| `music.title` | string | Título de la música usada |
| `music.author_name` | string | Autor de la música |
| `music.id` | string | ID de la música |
| `music.cover` | string | URL de la portada de la música |
| `video.play_url` | string | URL para reproducir el video |
| `video.duration` | integer | Duración en segundos |
| `video.height` | integer | Altura del video en px |
| `video.width` | integer | Ancho del video en px |
| `stats.play_count` | integer | Reproducciones |
| `stats.comment_count` | integer | Comentarios |
| `stats.share_count` | integer | Shares |
| `stats.digg_count` | integer | Likes |
| `stats.collect_count` | integer | Guardados |
| `author.unique_id` | string | Username del autor |
| `author.nickname` | string | Nombre del autor |
| `author.id` | string | ID interno del autor |
| `author.verified` | boolean | Si está verificado |
| `author.signature` | string | Bio del autor |
| `author.avatar` | string | URL del avatar |
| `author.follower_count` | integer | Seguidores |
| `author.following_count` | integer | Siguiendo |
| `author.heart_count` | integer | Total de likes recibidos |
| `author.video_count` | integer | Total de videos publicados |
| `link_user` | string | URL del perfil |

**Ejemplo de output:**

```json
[
  {
    "type": "Videos",
    "search": "taylorswift",
    "video_id": "7559313483398008095",
    "link_post": "https://www.tiktok.com/@taylorswift/video/7559313483398008095",
    "desc": "Never been accused of not keeping it 💯",
    "post_date": "2025-10-09 19:57:14",
    "create_time": 1760039834,
    "text_language": "en",
    "is_ad": false,
    "hashtags": [],
    "music.title": "The Fate of Ophelia",
    "music.author_name": "Taylor Swift",
    "music.id": "7556815852168759313",
    "music.cover": "https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/oQewhAfrNQKV6AteGNQAhmGGAjcLIMrYKAnexf.jpeg",
    "video.play_url": "https://v16-webapp-prime.tiktok.com/video/tos/maliva/tos-maliva-ve-0068c799-us/owf0qgRRGrlcCCJWAIe0ARAH6L6wKRII0EYjfQ/?a=1988...",
    "video.duration": 60,
    "video.height": 1024,
    "video.width": 576,
    "stats.play_count": 5700000,
    "stats.comment_count": 8927,
    "stats.share_count": 21800,
    "stats.digg_count": 1100000,
    "stats.collect_count": 38300,
    "author.unique_id": "taylorswift",
    "author.nickname": "Taylor Swift",
    "author.id": "6881290705605477381",
    "author.verified": true,
    "author.signature": "This is pretty much just a cat account",
    "author.avatar": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/c39c2807c155535cf328225955e00aba~tplv-tiktokx-cropcenter:720:720.jpeg",
    "author.follower_count": 33100000,
    "author.following_count": 0,
    "author.heart_count": 258300000,
    "author.video_count": 76,
    "link_user": "https://www.tiktok.com/@taylorswift"
  }
]
```

***

### Ejecución

1. Subir el actor a Apify.
2. Configurar los inputs según los perfiles y fechas deseadas.
3. Ejecutar el actor.
4. Descargar los resultados en formato JSON o CSV según tu necesidad.

***

### Notas

- Puedes usar `minDate` y `maxDate` para filtrar los videos por fecha de publicación.
- `resultsLimit` define cuántos videos se descargarán por perfil (máximo 200).
- La opción `Profile video sorting` permite seleccionar entre los videos más recientes, más antiguos, populares o más gustados.

***

Este README ya está **listo para subir a tu actor en Apify**.

# Actor input Schema

## `Input_Search` (type: `array`):

Add a list of usernames to want to scrape. You can add them one per line.

## `TypeVideo` (type: `string`):

If a profile has reposted videos, you can scrape them by selecting 'Reposts'

## `TypeSorter` (type: `string`):

Select Latest to scrape the most recent videos first, Oldest - the oldest videos first, Popular - the most popular videos first.

## `minDate` (type: `string`):

Select the earliest post date to include.

## `maxDate` (type: `string`):

Select the latest post date to include.

## `resultsLimit` (type: `integer`):

number of videos for scraping, 1-10000 are the allowed values

## Actor input object example

```json
{
  "Input_Search": [
    "google"
  ],
  "TypeVideo": "Videos",
  "TypeSorter": "Simple",
  "resultsLimit": 50
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "Input_Search": [
        "google"
    ],
    "resultsLimit": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraping_solutions/tiktok-profile-scraper-posts").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "Input_Search": ["google"],
    "resultsLimit": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("scraping_solutions/tiktok-profile-scraper-posts").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "Input_Search": [
    "google"
  ],
  "resultsLimit": 50
}' |
apify call scraping_solutions/tiktok-profile-scraper-posts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scraping_solutions/tiktok-profile-scraper-posts",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Profile Scraper POSTS",
        "description": "Extract data from TikTok profiles and videos they post. Get TikTok profile data, URLs, numbers of shares, followers, comments, hearts, video and music metadata. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.",
        "version": "0.0",
        "x-build-id": "iAfUshmjI1Zp1sTOo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraping_solutions~tiktok-profile-scraper-posts/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraping_solutions-tiktok-profile-scraper-posts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scraping_solutions~tiktok-profile-scraper-posts/runs": {
            "post": {
                "operationId": "runs-sync-scraping_solutions-tiktok-profile-scraper-posts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scraping_solutions~tiktok-profile-scraper-posts/run-sync": {
            "post": {
                "operationId": "run-sync-scraping_solutions-tiktok-profile-scraper-posts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "Input_Search",
                    "TypeVideo"
                ],
                "properties": {
                    "Input_Search": {
                        "title": "Profile(s)",
                        "type": "array",
                        "description": "Add a list of usernames to want to scrape. You can add them one per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "TypeVideo": {
                        "title": "Profile sections to scrape",
                        "enum": [
                            "Videos",
                            "Reposts"
                        ],
                        "type": "string",
                        "description": "If a profile has reposted videos, you can scrape them by selecting 'Reposts'",
                        "default": "Videos"
                    },
                    "TypeSorter": {
                        "title": "Profile video sorting",
                        "enum": [
                            "Simple",
                            "Popular",
                            "Oldest",
                            "Liked"
                        ],
                        "type": "string",
                        "description": "Select Latest to scrape the most recent videos first, Oldest - the oldest videos first, Popular - the most popular videos first.",
                        "default": "Simple"
                    },
                    "minDate": {
                        "title": "Minimum post date",
                        "type": "string",
                        "description": "Select the earliest post date to include."
                    },
                    "maxDate": {
                        "title": "Maximum post date",
                        "type": "string",
                        "description": "Select the latest post date to include."
                    },
                    "resultsLimit": {
                        "title": "Number of results by line",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "number of videos for scraping, 1-10000 are the allowed values",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
