ShareASale Affiliate API - Merchants & Activity (BYOC) avatar

ShareASale Affiliate API - Merchants & Activity (BYOC)

Pricing

from $2.00 / 1,000 item scrapeds

Go to Apify Store
ShareASale Affiliate API - Merchants & Activity (BYOC)

ShareASale Affiliate API - Merchants & Activity (BYOC)

Access ShareASale affiliate data via the official API (BYOC): merchants, coupons, deals and transaction activity reports for publishers. Bring your own API token.

Pricing

from $2.00 / 1,000 item scrapeds

Rating

0.0

(0)

Developer

viralanalyzer

viralanalyzer

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

🛒 ShareASale Affiliate API — Merchants, Coupons & Activity (BYOC)

🔗 View on Apify Store | 🇺🇸 English | 🇧🇷 Português

Query the official ShareASale Affiliate API for merchant status, merchant search, coupon deals, activity reports, payment history and banner ads. ShareASale is the 3rd largest US affiliate network (4,500+ merchants — fashion, home, niche e‑commerce). BYOC (Bring Your Own Credentials) model — you provide your affiliate ID + API token + API secret, we sign the requests for you. Anti‑bot‑immune (official API), ToS‑compliant, predictable cost.

✨ Features

  • Official ShareASale Affiliate API v3 — no HTML scraping, no anti‑bot blocks
  • 6 actions: merchantStatus, merchantSearch, couponDeals, activity, paymentHistory, bannerList
  • Version 3 auth — no IP whitelist required (essential for Apify's rotating IPs)
  • SHA‑256 HMAC signing handled automatically (you never see the crypto)
  • Pipe‑delimited parser — auto‑normalizes ShareASale's CSV‑with‑pipes output
  • Strict error surfacing — tagged messages ([SHAREASALE_API], [SHAREASALE_RATE], [INPUT])
  • NEVER 0 ITEMS guard — actor fails loudly with a concrete diagnosis instead of silently succeeding

🔑 BYOC setup (one‑time, ~5 min)

  1. Log in at https://shareasale.com (affiliate account, free signup)
  2. Go to Tools > Merchant Tools > API Reporting
  3. Create an API Token — select Version 3 so the calling IP does NOT need to be whitelisted (Apify IPs rotate; Version 2 would break)
  4. Copy your affiliateId, API Token and API Secret into the actor input

Why Version 3? ShareASale Version 2 requires you to whitelist every IP that calls the API. Apify runs on rotating datacenter IPs, so Version 2 would fail intermittently. Version 3 uses HMAC SHA‑256 of token:date:action:secret per‑request, which removes the IP requirement entirely.

📥 Input

ParameterTypeRequiredDefaultDescription
affiliateIdstring (secret)YesYour numeric ShareASale affiliate ID
apiTokenstring (secret)YesAPI token (Version 3) from Tools > API Reporting
apiSecretstring (secret)YesAPI secret matching the token
actionenumYesmerchantStatusWhich endpoint to call (see Actions table below)
keywordstringNo""Free‑text keyword for merchantSearch
categorystringNo""Category filter for merchantSearch
merchantIdintegerNo0Filter couponDeals / activity / bannerList to one merchant
dateStartstringConditional""YYYY-MM-DD. Required for activity. Optional for paymentHistory
dateEndstringConditional""YYYY-MM-DD. Required for activity
maxResultsintegerNo100Cap on rows pushed to dataset (1‑1000)

Actions

ActionPurpose
merchantStatusMerchants you can promote, with join status (joined / applied / declined)
merchantSearchFind new merchants by keyword or category
couponDealsActive coupons from joined merchants
activitySales / leads / clicks report for a date range
paymentHistoryYour payment records
bannerListBanner ads available for promotion

Input example

{
"affiliateId": "123456",
"apiToken": "your_api_token_here",
"apiSecret": "your_api_secret_here",
"action": "merchantSearch",
"keyword": "yoga",
"maxResults": 100
}

📤 Output

Every dataset record carries the same envelope plus all columns returned by ShareASale for the chosen action (pipe‑delimited headers are normalized — spaces become underscores).

{
"action": "merchantSearch",
"affiliateId": "123456",
"scrapedAt": "2026-05-15T14:25:00+00:00",
"source": "shareasale-affiliate-api-v3",
"MerchantID": "987654",
"OrganizationName": "Acme Yoga Co",
"Categories": "Health & Fitness",
"PowerRank": "42",
"AutoApprove": "true",
"CookieLength": "30",
"Status": "Active"
}

Actual column names vary per action — ShareASale documents them inside the response's first row. The actor never drops columns; it only strips empty strings to keep the dataset clean.

📋 Use Cases

  • Niche affiliate researchmerchantSearch by keyword to find untapped programs
  • Coupon site automationcouponDeals to keep deal pages fresh
  • Performance reportingactivity for daily revenue / EPC dashboards
  • Payout reconciliationpaymentHistory exported to your accounting stack
  • Creative pipelinebannerList for automated banner refresh on your sites
  • Compliance / auditmerchantStatus to track which merchants approved/declined your application

❓ FAQ

Q: Do I need to whitelist Apify IPs? A: No, as long as you use Version 3 credentials. The actor signs every request with HMAC SHA‑256, so ShareASale validates by signature, not IP.

Q: Are my credentials stored? A: No. They are read from the input and passed straight to shareasale.com/x.cfm. We never persist, log, or proxy them through our servers. Each user runs the actor with their own keys.

Q: Why does the actor sometimes return zero rows? A: It will throw [FAIL] Zero records extracted… instead of returning a silent empty dataset. Common causes: the account has not joined any merchant yet (use action=merchantSearch first), the date range for activity is too narrow, or the credentials are valid but the action is not enabled for your tier.

Q: Which ShareASale plan do I need? A: Standard publisher / affiliate accounts are free and include API access. There is no extra fee for using the API itself.

Q: Rate limits? A: ShareASale rate‑limits per token. The actor surfaces HTTP 429 as [SHAREASALE_RATE] with the Retry-After header. For high‑volume use, split runs across multiple tokens.

💰 Pricing

Pay‑per‑event (PPE): you only pay when the actor returns a real row. Zero results → zero charge. Anti‑bot blocks are impossible (official API), so success rate is essentially 100 % when credentials are valid.

EventCharged
item-scrapedper row pushed to dataset

📝 Changelog

v1.0 (2026-05-15)

  • Initial release covering all 6 affiliate‑facing actions
  • HMAC SHA‑256 Version 3 auth (no IP whitelist)
  • Pipe‑delimited parser with header normalization
  • Tagged error surface ([SHAREASALE_API], [SHAREASALE_RATE], [INPUT])
  • NEVER 0 ITEMS guard with action‑specific diagnosis
  • PPE charging on item-scraped with owner‑skip

🛒 ShareASale API de Afiliados — Lojistas, Cupons & Relatórios (BYOC)

🔗 View on Apify Store | 🇺🇸 English | 🇧🇷 Português

Consulta a API oficial de afiliados do ShareASale para status de lojistas, busca de lojistas, cupons ativos, relatórios de atividade, histórico de pagamentos e banners. O ShareASale é a 3ª maior rede de afiliação dos EUA (4.500+ lojistas — moda, casa, e‑commerce de nicho). Modelo BYOC (Bring Your Own Credentials) — você fornece seu ID de afiliado + token + secret, nós assinamos as requisições. Imune a anti‑bot (API oficial), em conformidade com os ToS, custo previsível.

✨ Funcionalidades

  • API ShareASale Affiliate v3 oficial — sem scraping de HTML, sem anti‑bot
  • 6 ações: merchantStatus, merchantSearch, couponDeals, activity, paymentHistory, bannerList
  • Autenticação Version 3 — não exige IP whitelist (essencial para o Apify, onde os IPs rotacionam)
  • HMAC SHA‑256 automático (você nunca lida com a criptografia)
  • Parser pipe‑delimitado — normaliza o formato CSV‑com‑pipes da ShareASale
  • Erros tipados[SHAREASALE_API], [SHAREASALE_RATE], [INPUT]
  • Proteção NEVER 0 ITEMS — falha alto e claro com diagnóstico ao invés de retornar dataset vazio em silêncio

🔑 Setup BYOC (uma vez, ~5 min)

  1. Entre em https://shareasale.com (cadastro grátis como afiliado)
  2. Vá em Tools > Merchant Tools > API Reporting
  3. Crie um API Token com Version 3 para que o IP de origem NÃO precise ser whitelisted (IPs do Apify rotacionam; Version 2 quebraria)
  4. Copie o affiliateId, o API Token e o API Secret no input do actor

Por que Version 3? A Version 2 do ShareASale exige whitelist de cada IP que chama a API. O Apify usa IPs rotativos, então a Version 2 falharia intermitentemente. A Version 3 assina cada requisição com HMAC SHA‑256 de token:data:action:secret, eliminando o requisito de IP.

📥 Entrada

ParâmetroTipoObrigatórioPadrãoDescrição
affiliateIdstring (secret)SimSeu ID numérico de afiliado no ShareASale
apiTokenstring (secret)SimToken de API (Version 3) em Tools > API Reporting
apiSecretstring (secret)SimSecret correspondente ao token
actionenumSimmerchantStatusQual endpoint chamar
keywordstringNão""Palavra‑chave para merchantSearch
categorystringNão""Filtro de categoria para merchantSearch
merchantIdinteiroNão0Filtra couponDeals / activity / bannerList para um único lojista
dateStartstringCondicional""YYYY-MM-DD. Obrigatório para activity. Opcional para paymentHistory
dateEndstringCondicional""YYYY-MM-DD. Obrigatório para activity
maxResultsinteiroNão100Limite de linhas no dataset (1‑1000)

📤 Saída

Todo registro carrega o envelope abaixo + todas as colunas retornadas pelo ShareASale para a ação escolhida. Os cabeçalhos pipe‑delimitados são normalizados (espaços viram underscore). Strings vazias são descartadas; zeros e false são preservados.

📋 Casos de Uso

  • Pesquisa de afiliados de nichomerchantSearch por keyword para encontrar programas pouco explorados
  • Sites de cupons automatizadoscouponDeals mantém páginas de ofertas atualizadas
  • Relatórios de performanceactivity alimenta dashboards diários de receita / EPC
  • Conciliação de pagamentospaymentHistory exportado direto para a contabilidade
  • Pipeline criativobannerList automatiza atualização de banners nos seus sites
  • CompliancemerchantStatus rastreia quais lojistas aprovaram/recusaram sua aplicação

❓ Perguntas Frequentes

P: Preciso fazer whitelist dos IPs do Apify? R: Não, desde que use credenciais Version 3. O actor assina cada requisição com HMAC SHA‑256, e o ShareASale valida por assinatura, não por IP.

P: Vocês armazenam minhas credenciais? R: Não. Elas são lidas do input e passadas direto para shareasale.com/x.cfm. Não persistimos, logamos ou intermediamos. Cada usuário roda o actor com suas próprias chaves.

P: Por que o actor às vezes retorna zero linhas? R: Ele lança [FAIL] Zero records extracted… em vez de retornar dataset vazio em silêncio. Causas comuns: a conta ainda não juntou nenhum lojista (use action=merchantSearch antes), faixa de datas muito estreita em activity, ou credenciais válidas mas a ação não está habilitada no seu tier.

P: Quais limites de taxa? R: O ShareASale limita por token. O actor expõe HTTP 429 como [SHAREASALE_RATE] com o cabeçalho Retry-After. Para volume alto, divida runs entre vários tokens.

💰 Preços

Pay‑per‑event (PPE): você só paga quando o actor retorna uma linha real. Zero resultado → zero cobrança. Anti‑bot é impossível (API oficial), então a taxa de sucesso é ~100 % quando as credenciais são válidas.

🔗 Actors Relacionados

📝 Changelog

v1.0 (2026-05-15)

  • Release inicial cobrindo as 6 ações voltadas ao afiliado
  • Autenticação HMAC SHA‑256 Version 3 (sem IP whitelist)
  • Parser pipe‑delimitado com normalização de cabeçalho
  • Erros tipados ([SHAREASALE_API], [SHAREASALE_RATE], [INPUT])
  • Proteção NEVER 0 ITEMS com diagnóstico por ação
  • Cobrança PPE em item-scraped com owner‑skip