# Plataforma de SPY Externas (`ycarrillo/plataforma-de-spy-externas`) Actor

Actor para extraer anuncios, productos, métricas y keywords de plataformas SPY externas como AdSpy, Minea, BigSpy y SimilarWeb.

- **URL**: https://apify.com/ycarrillo/plataforma-de-spy-externas.md
- **Developed by:** [Heartbeat Strategy Group LLC](https://apify.com/ycarrillo) (community)
- **Categories:** Lead generation, E-commerce, Social media
- **Stats:** 2 total users, 1 monthly users, 92.9% runs succeeded, 0 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

## Plataforma de SPY Externas

Extrae anuncios, productos, métricas y keywords de las principales plataformas públicas de publicidad digital: **Meta Ads Library**, **TikTok Creative Center** y **Google Ads Transparency Center**.

> ✅ **100% gratuito** — No requiere suscripciones a plataformas de pago. Usa fuentes oficiales y públicas.

---

### ¿Qué hace este Actor?

Este Actor actúa como una **plataforma de inteligencia publicitaria** que consolida datos de múltiples fuentes oficiales en un solo lugar. Ideal para:

- 🔍 **Investigadores de marketing** que analizan tendencias de anuncios
- 📊 **Agencias digitales** que hacen benchmarking competitivo
- 🛒 **E-commerce y dropshippers** que identifican productos ganadores
- 💼 **Freelancers y consultores** que reportan estrategias de la competencia

---

### Plataformas soportadas

| Plataforma | Fuente de datos | Acceso |
|---|---|---|
| **Meta Ads Library** | Facebook/Instagram anuncios activos | Gratuito (token opcional) |
| **TikTok Creative Center** | Anuncios trending en TikTok | Gratuito |
| **Google Ads Transparency** | Anuncios de Google Search y Display | Gratuito |

---

### Datos extraídos

- 📢 **Anuncios activos**: texto, imagen/video, CTA, fechas
- 🏪 **Información del anunciante**: nombre, país, categoría
- 📈 **Métricas de rendimiento**: impresiones, alcance, tipo de medio
- 🔑 **Keywords y hashtags**: términos usados en los anuncios
- 🌍 **Segmentación**: países objetivo, idioma

---

### Parámetros de entrada

| Parámetro | Tipo | Descripción | Requerido |
|---|---|---|---|
| `platform` | String | Plataforma a consultar: `meta`, `tiktok`, `google` | ✅ Sí |
| `keywords` | Array | Lista de palabras clave a buscar | ⬜ Opcional |
| `advertiser` | String | Nombre del anunciante específico | ⬜ Opcional |
| `country` | String | Código de país (ej: `US`, `MX`, `ES`) | ⬜ Opcional |
| `ad_type` | String | Tipo de anuncio: `ALL`, `IMAGE`, `VIDEO`, `TEXT` | ⬜ Opcional |
| `max_results` | Integer | Número máximo de resultados (default: 50) | ⬜ Opcional |
| `date_from` | String | Fecha inicio en formato `YYYY-MM-DD` | ⬜ Opcional |
| `date_to` | String | Fecha fin en formato `YYYY-MM-DD` | ⬜ Opcional |
| `meta_token` | String | Token de acceso a Meta API (amplía límites) | ⬜ Opcional |

---

### Formato de salida

Cada anuncio extraído se guarda en el dataset de Apify con esta estructura:

```json
{
  "platform": "meta",
  "ad_id": "123456789",
  "advertiser_name": "Marca Ejemplo",
  "advertiser_country": "MX",
  "ad_text": "Texto del anuncio...",
  "media_type": "VIDEO",
  "status": "ACTIVE",
  "start_date": "2024-01-15",
  "end_date": null,
  "impressions": "1000-5000",
  "countries": ["MX", "US", "ES"],
  "currency": "MXN",
  "url": "https://www.facebook.com/ads/library/?id=123456789",
  "scraped_at": "2024-06-01T12:00:00Z"
}
````

***

### Ejemplos de uso

#### Buscar anuncios de fitness en Meta

```json
{
  "platform": "meta",
  "keywords": ["gym", "fitness", "suplementos"],
  "country": "MX",
  "ad_type": "VIDEO",
  "max_results": 100
}
```

#### Analizar anuncios trending en TikTok

```json
{
  "platform": "tiktok",
  "keywords": ["dropshipping", "winning product"],
  "country": "US",
  "max_results": 50
}
```

#### Investigar competidores en Google Ads

```json
{
  "platform": "google",
  "advertiser": "Nike",
  "country": "US",
  "max_results": 30
}
```

***

### Token de Meta API (opcional)

Para obtener más resultados de Meta Ads Library, puedes usar un token de acceso:

1. Ve a [developers.facebook.com](https://developers.facebook.com)
2. Crea una aplicación gratuita
3. Genera un token de acceso de usuario
4. Agrégalo en el campo `meta_token`

Sin token, el Actor sigue funcionando con límites más bajos.

***

### Preguntas frecuentes

**¿Necesito pagar alguna suscripción?**
No. Este Actor usa únicamente fuentes de datos públicas y gratuitas.

**¿Es legal usar estos datos?**
Sí. Todas las plataformas cubiertas tienen una biblioteca pública de anuncios por transparencia regulatoria (GDPR, regulaciones electorales, etc.).

**¿Puedo usarlo en mis proyectos comerciales?**
Sí, puedes usar los datos extraídos para análisis competitivo, investigación de mercado y creación de estrategias publicitarias.

**¿Con qué frecuencia se actualizan los datos?**
Los datos se extraen en tiempo real cada vez que ejecutas el Actor.

***

### Soporte

¿Tienes preguntas o encontraste un bug? Abre un issue en la sección de **Issues** del Actor.

***

*Desarrollado por [ycarrillo](https://apify.com/ycarrillo)*

# Actor input Schema

## `platform` (type: `string`):

Fuente oficial de donde extraer los anuncios.

## `keywords` (type: `array`):

Lista de palabras clave para buscar anuncios.

## `advertiser` (type: `string`):

Nombre de la marca o anunciante especifico a buscar.

## `country` (type: `string`):

Codigo de pais ISO (ej: US, MX, ES).

## `ad_type` (type: `string`):

Filtrar por tipo de medio del anuncio.

## `max_results` (type: `integer`):

Numero maximo de anuncios a extraer.

## `date_from` (type: `string`):

Fecha de inicio en formato YYYY-MM-DD.

## `date_to` (type: `string`):

Fecha de fin en formato YYYY-MM-DD.

## `meta_token` (type: `string`):

Token de acceso a la API de Meta para obtener mas resultados. Opcional.

## Actor input object example

```json
{
  "platform": "meta",
  "country": "US",
  "ad_type": "ALL",
  "max_results": 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ycarrillo/plataforma-de-spy-externas").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ycarrillo/plataforma-de-spy-externas").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 '{}' |
apify call ycarrillo/plataforma-de-spy-externas --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Plataforma de SPY Externas",
        "description": "Actor para extraer anuncios, productos, métricas y keywords de plataformas SPY externas como AdSpy, Minea, BigSpy y SimilarWeb.",
        "version": "0.0",
        "x-build-id": "meXBbrsc8esuQckLU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ycarrillo~plataforma-de-spy-externas/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ycarrillo-plataforma-de-spy-externas",
                "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/ycarrillo~plataforma-de-spy-externas/runs": {
            "post": {
                "operationId": "runs-sync-ycarrillo-plataforma-de-spy-externas",
                "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/ycarrillo~plataforma-de-spy-externas/run-sync": {
            "post": {
                "operationId": "run-sync-ycarrillo-plataforma-de-spy-externas",
                "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": [
                    "platform"
                ],
                "properties": {
                    "platform": {
                        "title": "Plataforma",
                        "enum": [
                            "meta",
                            "tiktok",
                            "google"
                        ],
                        "type": "string",
                        "description": "Fuente oficial de donde extraer los anuncios.",
                        "default": "meta"
                    },
                    "keywords": {
                        "title": "Keywords / Palabras clave",
                        "type": "array",
                        "description": "Lista de palabras clave para buscar anuncios.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "advertiser": {
                        "title": "Nombre del Anunciante",
                        "type": "string",
                        "description": "Nombre de la marca o anunciante especifico a buscar."
                    },
                    "country": {
                        "title": "Pais",
                        "type": "string",
                        "description": "Codigo de pais ISO (ej: US, MX, ES).",
                        "default": "US"
                    },
                    "ad_type": {
                        "title": "Tipo de Anuncio",
                        "enum": [
                            "ALL",
                            "IMAGE",
                            "VIDEO",
                            "TEXT"
                        ],
                        "type": "string",
                        "description": "Filtrar por tipo de medio del anuncio.",
                        "default": "ALL"
                    },
                    "max_results": {
                        "title": "Maximo de Resultados",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Numero maximo de anuncios a extraer.",
                        "default": 50
                    },
                    "date_from": {
                        "title": "Fecha Inicio",
                        "type": "string",
                        "description": "Fecha de inicio en formato YYYY-MM-DD."
                    },
                    "date_to": {
                        "title": "Fecha Fin",
                        "type": "string",
                        "description": "Fecha de fin en formato YYYY-MM-DD."
                    },
                    "meta_token": {
                        "title": "Meta API Token (opcional)",
                        "type": "string",
                        "description": "Token de acceso a la API de Meta para obtener mas resultados. Opcional."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
