# Raspador de TikTok (`sauermar/raspador-de-tiktok`) Actor

Potente raspador de TikTok para extraer datos de videos, hashtags y perfiles de TikTok. Úsalo para raspar perfiles, comentarios, hashtags, publicaciones, URL, números de seguidores/seguidos, Me gusta, nombres, videos y datos relacionados con la música de TikTok. Descarga datos de TikTok en HTML, JSO

- **URL**: https://apify.com/sauermar/raspador-de-tiktok.md
- **Developed by:** [Markéta Sauerová](https://apify.com/sauermar) (community)
- **Categories:** Social media
- **Stats:** 21 total users, 10 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### ¿Qué hace el raspador de TikTok?
Nuestro raspador de TikTok te permite potenciar tu extracción de datos de TikTok. Esta poderosa API no oficial de TikTok te brindará datos de TikTok para usar en tus propios proyectos, informes comerciales y como base para nuevas aplicaciones. TikTok Scraper te permite raspar:

- Todos los resultados de los hashtags elegidos, incluidos los detalles: videos principales, marcas de tiempo, número de visitas/comentarios/videos, etc.
- Comentarios de videos de TikTok.
- Todas las publicaciones de los perfiles elegidos, incluidos los detalles: nombre, apodo, ID, biografía, números de seguidores/seguidos, reproducciónes, número de comentarios y Me gusta, etc.
- Publicaciones de video individuales usando URL de video específicas.
- Datos relacionados con videos y música.


### ¿Solo necesitas algunos resultados de TikTok?
Utiliza nuestro [raspador de TikTok gratuito](https://apify.com/sauermar/free-tiktok-scraper) dedicado súper rápido si deseas raspar datos concretos de TikTok de manera eficiente. Simplemente ingresa uno o más nombres de perfiles, hashtags o URL de video de TikTok y haz clic para raspar. Ten en cuenta que nuestro raspador de TikTok gratuito está limitado a hasta 20 resultados y 5 comentarios.


### ¿Cuánto costará TikTok Scraper?
Una ejecución del raspador de TikTok en la [plataforma Apify](https://console.apify.com) utilizará aproximadamente 0,2 [unidades de cómputo](https://help.apify.com/en/articles/3490384-what-is-a-compute-unit) para obtener 1000 resultados. Esto significa que, en promedio, puedes extraer alrededor de 1000 resultados por menos de USD 1 en créditos de uso de la plataforma.

La forma más fácil de saber cuántos créditos necesitará su raspador es realizar una prueba. Si no tienes certeza de cuánto crédito te queda en tu plan, verifique tus límites en la pestaña Configuración -> Uso y facturación en tu [Console](https://console.apify.com).


### Cómo raspar TikTok - tutorial y guía de video
El raspador de TikTok es una herramienta de raspado lista para usar y no requiere ningún conocimiento de programación para comenzar. Para familiarizarte con el uso de un raspador de TikTok como este, sigue nuestra [guía escrita paso a paso](https://blog.apify.com/how-to-scrape-tiktok-tutorial/) o mira nuestro breve [video tutorial](https://www.youtube.com/watch?v=uZ0LYBCjvd4). Los pasos del tutorial también se aplican a nuestro [raspador de TikTok gratuito](https://apify.com/sauermar/free-tiktok-scraper).


### Cómo usar los datos TikTok extraídos
- Observa y rastrea tendencias y predice influenciadores emergentes.
- Simplifica la investigación de mercado para planificar campañas publicitarias y desafíos de hashtag.
- Prepárate para una próxima campaña de marketing de TikTok: crea y promociona tu propio canal o colabora con un influencer.
- Escanea el mercado en busca de revisiones de productos auténticos y análisis de sentimientos.
- Recopila datos de encuestas de manera rápida y eficiente.
- Obtén datos para investigaciones y experimentos de escucha social.
- Difunde conciencia sobre marcas, causas y problemas sociales.
- Analiza campañas virales y tendencias.
- Identifica contenido no verificado e información inexacta con alto valor público.

También puedes consultar nuestras [páginas de la industria](https://apify.com/industries) para obtener más ideas sobre el uso de datos de web scraping; por ejemplo, puedes monitorear el mercado y crear análisis basados en datos para [negocios minoristas y de comercio electrónico](https://apify.com/industries/ecommerce-and-retail).


### Servidores proxies
El raspador de TikTok funciona bien con los [proxies de conjuntos de datos de Apify](https://apify.com/proxy), que están configurados como predeterminados para todos nuestros raspadores. Sin embargo, si has notado que su ejecución se ha atascado durante demasiado tiempo, se recomienda cambiar a proxies residenciales para obtener resultados más rápidos, confiables y eficientes.


### Información personal
Debes tener en cuenta que tus resultados pueden contener datos personales. Los datos personales están protegidos por [RGPD](https://es.wikipedia.org/wiki/Reglamento_General_de_Protección_de_Datos) en la Unión Europea y otras leyes y regulaciones en todo el mundo. No debes recopilar datos personales a menos que tengas una razón legítima para hacerlo. Si no sabes con certeza de si tu razón es legítima, consulta a tus abogados. Puedes leer los conceptos básicos del web scraping ético en nuestra publicación de blog sobre la [legalidad del web scraping](https://blog.apify.com/is-web-scraping-legal/).


### Tu opinión
Actualmente, el raspador de TikTok extrae información en función de hashtags, perfiles o publicaciones. Pronto agregaremos más funcionalidades, así que no dudes en [contactarnos](mailto:support@apify.com) para cualquier sugerencia o mejora.

# Actor input Schema

## `hashtags` (type: `array`):

Just add TikTok hashtags and the scraper will collect information about users, followers, likes, and more.
## `resultsPerPage` (type: `integer`):

The number of results that will be scraped from every hashtag and profile.
## `profiles` (type: `array`):

Add the name of user you want to scrape.
## `postURLs` (type: `array`):

Add the URLs of posted videos you want to scrape. You can enter URLs one by one, or you can upload or link to a text file.
## `commentsPerPost` (type: `integer`):

The number of comments that will be scraped from every scraped result. 0 means no comments will be scraped and you don't need to use cookies to login
## `loginCookies` (type: `array`):

If you want to scrape comments you need to sign in to TikTok and you can use your cookies on input.
## `proxyConfiguration` (type: `object`):

Automatic proxy and the country of your choice is usually the best option, but you can also select specific proxies, or use your own custom proxies.
## `maxRequestRetries` (type: `integer`):

How many times a page will be retried in case of being blocked or other errors.
## `maxConcurrency` (type: `integer`):

Max number of allowed instances running in parallel. More instances need more memory!

## Actor input object example

```json
{
  "hashtags": [
    "followforfollowback"
  ],
  "resultsPerPage": 10,
  "commentsPerPost": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxRequestRetries": 10,
  "maxConcurrency": 1
}
````

# 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 = {
    "hashtags": [
        "followforfollowback"
    ],
    "resultsPerPage": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sauermar/raspador-de-tiktok").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 = {
    "hashtags": ["followforfollowback"],
    "resultsPerPage": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("sauermar/raspador-de-tiktok").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 '{
  "hashtags": [
    "followforfollowback"
  ],
  "resultsPerPage": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call sauermar/raspador-de-tiktok --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Raspador de TikTok",
        "description": "Potente raspador de TikTok para extraer datos de videos, hashtags y perfiles de TikTok. Úsalo para raspar perfiles, comentarios, hashtags, publicaciones, URL, números de seguidores/seguidos, Me gusta, nombres, videos y datos relacionados con la música de TikTok. Descarga datos de TikTok en HTML, JSO",
        "version": "0.0",
        "x-build-id": "mtTJhBx4l0G09mf3m"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sauermar~raspador-de-tiktok/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sauermar-raspador-de-tiktok",
                "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/sauermar~raspador-de-tiktok/runs": {
            "post": {
                "operationId": "runs-sync-sauermar-raspador-de-tiktok",
                "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/sauermar~raspador-de-tiktok/run-sync": {
            "post": {
                "operationId": "run-sync-sauermar-raspador-de-tiktok",
                "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": [
                    "proxyConfiguration",
                    "resultsPerPage"
                ],
                "properties": {
                    "hashtags": {
                        "title": "Hashtag(s) to scrape from TikTok",
                        "type": "array",
                        "description": "Just add TikTok hashtags and the scraper will collect information about users, followers, likes, and more.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "resultsPerPage": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "The number of results that will be scraped from every hashtag and profile."
                    },
                    "profiles": {
                        "title": "Profile(s)",
                        "type": "array",
                        "description": "Add the name of user you want to scrape.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "postURLs": {
                        "title": "Direct URL(s) for scraping specific video(s)",
                        "type": "array",
                        "description": "Add the URLs of posted videos you want to scrape. You can enter URLs one by one, or you can upload or link to a text file.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "commentsPerPost": {
                        "title": "Max comments per post",
                        "minimum": 0,
                        "type": "integer",
                        "description": "The number of comments that will be scraped from every scraped result. 0 means no comments will be scraped and you don't need to use cookies to login",
                        "default": 0
                    },
                    "loginCookies": {
                        "title": "Cookies",
                        "type": "array",
                        "description": "If you want to scrape comments you need to sign in to TikTok and you can use your cookies on input."
                    },
                    "proxyConfiguration": {
                        "title": "Set up your proxy configuration",
                        "type": "object",
                        "description": "Automatic proxy and the country of your choice is usually the best option, but you can also select specific proxies, or use your own custom proxies."
                    },
                    "maxRequestRetries": {
                        "title": "Max request retries",
                        "type": "integer",
                        "description": "How many times a page will be retried in case of being blocked or other errors.",
                        "default": 10
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "type": "integer",
                        "description": "Max number of allowed instances running in parallel. More instances need more memory!",
                        "default": 1
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
