import requests, sys
sys.path.insert(0, r'C:\Users\Roel\clawd\scripts\demandgen-pipeline')
from config import WEBGAINS_API, PUBLISHER_ID, webgains_headers
url = f'{WEBGAINS_API}/auth/publishers/{PUBLISHER_ID}/campaigns/1622250/feeds/products'
for size in [500, 200, 100]:
    r = requests.get(url, headers=webgains_headers(), params={'size': size, 'fields[]': ['title','brand','id']})
    d = r.json()
    prods = d.get('data', [])
    print(f'size={size}: {len(prods)} products')
