# How to Export Leads by List

**URL:** <https://forum.mautic.org/t/how-to-export-leads-by-list/3460>\
**Category:** General Discussion\
**Created:** [February 14, 2016, 5:38pm UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460 "2016-02-14T17:38:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![qvplite](https://avatars.discourse-cdn.com/v4/letter/q/35a633/32.png) [@qvplite](https://forum.mautic.org/u/qvplite)\
**Post date:** [February 14, 2016, 5:38pm UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/1 "2016-02-14T17:38:23Z")

</div>

This is a feature that isn’t yet available in Mautic, but there is a simple workaround for anyone needing to export leads from a specific list. Simply go into you’re web host’s cPanel, open phpMyAdmin, and enter the following SQL query (being sure to reformat these table names / list numbers according to your personal data):  
  
  
  
SELECT mauticsf\_leads.id, mauticsf\_leads.date\_added, mauticsf\_leads.firstname, mauticsf\_leads.email, mauticsf\_lead\_lists\_leads.leadlist\_id  
  
FROM mauticsf\_leads, mauticsf\_lead\_lists\_leads  
  
WHERE mauticsf\_leads.id = mauticsf\_lead\_lists\_leads.lead\_id  
  
AND mauticsf\_lead\_lists\_leads.leadlist\_id ![=3]( "=3")  
  
LIMIT 0 , 10000  
  
  
  
You can increase the Limit as high as you need depending on how many leads are on your list.

---

<div class="post-metadata">

**Author:** ![qvplite](https://avatars.discourse-cdn.com/v4/letter/q/35a633/32.png) [@qvplite](https://forum.mautic.org/u/qvplite)\
**Post date:** [February 14, 2016, 5:38pm UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/2 "2016-02-14T17:38:23Z")

</div>

This is a feature that isn’t yet available in Mautic, but there is a simple workaround for anyone needing to export leads from a specific list. Simply go into you’re web host’s cPanel, open phpMyAdmin, and enter the following SQL query (being sure to reformat these table names / list numbers according to your personal data):

SELECT mauticsf\_leads.id, mauticsf\_leads.date\_added, mauticsf\_leads.firstname, mauticsf\_leads.email, mauticsf\_lead\_lists\_leads.leadlist\_id  
FROM mauticsf\_leads, mauticsf\_lead\_lists\_leads  
WHERE mauticsf\_leads.id = mauticsf\_lead\_lists\_leads.lead\_id  
AND mauticsf\_lead\_lists\_leads.leadlist\_id =3  
LIMIT 0 , 10000

You can increase the Limit as high as you need depending on how many leads are on your list.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [February 15, 2016, 10:13am UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/3 "2016-02-15T10:13:39Z")

</div>

Here is discussion about the same question: [https://www.mautic.org/community/index.php/735-export-leads/0](https://www.mautic.org/community/index.php/735-export-leads/0)

---

<div class="post-metadata">

**Author:** ![surya.caprice](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@surya.caprice](https://forum.mautic.org/u/surya.caprice)\
**Post date:** [February 15, 2016, 5:54am UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/4 "2016-02-15T05:54:12Z")

</div>

I have the same question how to export the leads in a list to csv?

---

<div class="post-metadata">

**Author:** ![edsonmoreira](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/edsonmoreira/32/2254_2.png) [@edsonmoreira](https://forum.mautic.org/u/edsonmoreira)\
**Post date:** [June 19, 2017, 4:10pm UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/5 "2017-06-19T16:10:44Z")

</div>

Hello guys, I have 20K contacts from my old mail marketing provider, but the native import toll is not working fine on Mautic.  
Please could you share a query to insert contacts onto may Mautic DB?

Thanks.

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [June 19, 2017, 5:33pm UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/6 "2017-06-19T17:33:14Z")

</div>

@edsonmoreira why you said is not working? in my end is working like a BOSS you have check your CSV file.

---

<div class="post-metadata">

**Author:** ![getclients](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/getclients/32/186_2.png) [@getclients](https://forum.mautic.org/u/getclients)\
**Post date:** [July 4, 2017, 9:27am UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/7 "2017-07-04T09:27:08Z")

</div>

How do i export subscriber only?

When i export my contacts it exports ALL subscribers (subscribed and unsubscribed)

How do i only export the subscribed contacts?

Thanks in advance  
David

---

<div class="post-metadata">

**Author:** ![edsonmoreira](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/edsonmoreira/32/2254_2.png) [@edsonmoreira](https://forum.mautic.org/u/edsonmoreira)\
**Post date:** [July 5, 2017, 7:48pm UTC](https://forum.mautic.org/t/how-to-export-leads-by-list/3460/8 "2017-07-05T19:48:40Z")

</div>

@ninjoan I have a list greater than 20K contacts. The Mautic’s import toll does not support that… It crashes and/or get stucked. I think would be easier if we can insert directly into the DB by SQL command.
