Les produits deviennent viraux sur TikTok des jours avant que les vendeurs Amazon ne les stockent. Ce pipeline détecte les mentions de produits tendance sur TikTok, puis vérifie sur Amazon la disponibilité, les prix et le nombre d'avis. En saisissant l'écart entre la viralité TikTok et l'offre Amazon, les marketeurs affiliés et les dropshippers bénéficient d'une fenêtre de premier arrivé.
Prérequis
- Python 3.8+
- bibliothèque requests
- Une clé API Scavio depuis scavio.dev
- Catégories de produits à surveiller
Parcours
Étape 1: Rechercher sur TikTok les mentions de produits tendance
Trouver des vidéos TikTok liées à des produits avec un fort engagement.
import os, requests, json
from datetime import datetime
API_KEY = os.environ['SCAVIO_API_KEY']
TH = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json'}
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}
PRODUCT_QUERIES = [
'tiktok made me buy it 2026',
'viral amazon find',
'amazon must haves trending',
'best amazon products tiktok',
]
def search_tiktok_trends(query):
data = requests.post('https://api.scavio.dev/api/v1/tiktok/search/videos',
headers=TH, json={'query': query}).json()
videos = data.get('videos', data.get('data', {}).get('videos', []))
return [{'desc': v.get('desc', '')[:100], 'plays': v.get('stats', {}).get('playCount', 0),
'likes': v.get('stats', {}).get('diggCount', 0),
'author': v.get('author', {}).get('uniqueId', '')} for v in videos]
all_trends = []
for q in PRODUCT_QUERIES:
videos = search_tiktok_trends(q)
all_trends.extend(videos)
print(f'"{q}": {len(videos)} videos')
print(f'Total: {len(all_trends)} product videos. Cost: ${len(PRODUCT_QUERIES) * 0.005:.3f}')Étape 2: Extraire les noms de produits des descriptions TikTok
Analyser les noms de produits et les mots-clés des descriptions vidéo.
import re
def extract_products(videos):
"""Extract likely product names from TikTok video descriptions."""
products = []
for v in videos:
desc = v['desc']
# Look for product-like patterns
words = desc.split()
# Filter for multi-word product names (capitalized sequences)
current = []
for w in words:
clean = re.sub(r'[^a-zA-Z0-9]', '', w)
if clean and (clean[0].isupper() or clean.lower() in ['led', 'usb', 'mini']):
current.append(clean)
else:
if len(current) >= 2:
products.append(' '.join(current))
current = []
if len(current) >= 2:
products.append(' '.join(current))
# Count frequency
from collections import Counter
freq = Counter(products)
top = freq.most_common(10)
print(f'\nTop trending products from TikTok:')
for product, count in top:
print(f' {product}: mentioned in {count} videos')
return [p for p, _ in top]
product_names = extract_products(all_trends)
print(f'\nProducts to check on Amazon: {len(product_names)}')Étape 3: Recouper les produits sur Amazon
Vérifier la disponibilité, le prix et le nombre d'avis Amazon pour chaque produit tendance.
def check_amazon(product):
"""Search Amazon for a product and return pricing data."""
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': product, 'platform': 'amazon', 'country_code': 'us'}).json()
results = data.get('organic_results', [])
if not results:
return {'product': product, 'available': False}
top = results[0]
return {
'product': product,
'available': True,
'title': top.get('title', '')[:60],
'price': top.get('price', 'N/A'),
'rating': top.get('rating', 'N/A'),
'reviews': top.get('reviews', 0),
'link': top.get('link', '')
}
def trend_report(product_names):
print(f'\n=== TikTok -> Amazon Trend Report - {datetime.now().strftime("%Y-%m-%d")} ===')
for product in product_names[:8]:
info = check_amazon(product)
if info['available']:
print(f' FOUND: {product}')
print(f' Amazon: {info["title"]}')
print(f' Price: {info["price"]} | Rating: {info["rating"]} | Reviews: {info["reviews"]}')
else:
print(f' GAP: {product} - not yet on Amazon (opportunity)')
cost = len(product_names[:8]) * 0.005 + len(PRODUCT_QUERIES) * 0.005
print(f'\nTotal cost: ${cost:.3f}')
trend_report(product_names)Exemple Python
import os, requests
TH = {'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}', 'Content-Type': 'application/json'}
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
# Find trending on TikTok
tt = requests.post('https://api.scavio.dev/api/v1/tiktok/search/videos',
headers=TH, json={'query': 'viral amazon find'}).json()
videos = tt.get('videos', tt.get('data', {}).get('videos', []))
print(f'TikTok: {len(videos)} trending videos')
# Check Amazon
az = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': 'LED strip lights', 'platform': 'amazon', 'country_code': 'us'}).json()
print(f'Amazon: {len(az.get("organic_results", []))} products')
print('Cost: $0.010')Exemple JavaScript
const TH = { 'Authorization': `Bearer ${process.env.SCAVIO_API_KEY}`, 'Content-Type': 'application/json' };
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
const tt = await fetch('https://api.scavio.dev/api/v1/tiktok/search/videos', {
method: 'POST', headers: TH, body: JSON.stringify({ query: 'viral amazon find' })
}).then(r => r.json());
console.log(`TikTok: ${(tt.videos || []).length} videos`);
const az = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: SH, body: JSON.stringify({ query: 'LED strip lights', platform: 'amazon', country_code: 'us' })
}).then(r => r.json());
console.log(`Amazon: ${(az.organic_results || []).length} products`);Sortie attendue
"tiktok made me buy it 2026": 12 videos
"viral amazon find": 8 videos
"amazon must haves trending": 10 videos
Total: 42 product videos. Cost: $0.020
Top trending products from TikTok:
LED Strip Lights: mentioned in 5 videos
Mini Projector: mentioned in 3 videos
=== TikTok -> Amazon Trend Report ===
FOUND: LED Strip Lights
Amazon: LED Strip Lights 50ft with Remote Control RGB...
Price: $12.99 | Rating: 4.3 | Reviews: 2340
GAP: Cloud Light Lamp - not yet on Amazon (opportunity)
Total cost: $0.060