# Extracting user information programmatically

**URL:** <https://discuss.openedx.org/t/extracting-user-information-programmatically/19453>\
**Category:** Site Operators\
**Created:** [August 27, 2026, 1:43pm UTC](https://discuss.openedx.org/t/extracting-user-information-programmatically/19453 "2026-08-27T13:43:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mboisson](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mboisson/32/7551_2.png) [@mboisson](https://discuss.openedx.org/u/mboisson)\
**Post date:** [August 27, 2026, 1:43pm UTC](https://discuss.openedx.org/t/extracting-user-information-programmatically/19453/1 "2026-08-27T13:43:39Z")

</div>

Hi,

I am using Verawood with the new implementation of `PROFILE_EXTENSION_FORM` and storage. What would be the best way to extract this user information programmatically from OpenEdX ?

In particular, I want to extract the list of users with their name, email address as well as custom profile fields (added through a fork of [GitHub - BryanttV/custom-extra-fields: An example app for extending user profile fields in Open edX · GitHub](https://github.com/BryanttV/custom-extra-fields) `REGISTRATION_EXTRA_FIELDS` and `PROFILE_EXTENSION_FORM`)

I don’t mind running a script through `tutor local run lms ./manage.py lms shell -c`, but a web API access would be best.

---

<div class="post-metadata">

**Author:** ![mboisson](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mboisson/32/7551_2.png) [@mboisson](https://discuss.openedx.org/u/mboisson)\
**Post date:** [August 27, 2026, 2:20pm UTC](https://discuss.openedx.org/t/extracting-user-information-programmatically/19453/2 "2026-08-27T14:20:00Z")

</div>

I think I resolved the “running a script” part:

```auto
$ cat extra_custom_fields.py
from custom_extra_fields.models import CustomExtraFields
i = 0
print(f'record id, username, email, research area, position, wants newsletter')
for e in CustomExtraFields.objects.all():
    print(f'{i}, {e.user.username}, {e.user.email}, {e.research_area}, {e.position}, {e.wants_newsletter}')
    i += 1

```

and then

```auto
[tutor@edx1 ~]$ tutor local run lms ./manage.py lms shell -c "$(<extra_custom_fields.py)" 2>&1 | grep "^[0-9]*,\|^record"

```

will print those records.

I would still prefer if there is a way with a remote API. If anyone has pointers for that ?

---

<div class="post-metadata">

**Author:** ![sarina](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sarina/32/2308_2.png) [@sarina](https://discuss.openedx.org/u/sarina)\
**Post date:** [August 31, 2026, 4:38pm UTC](https://discuss.openedx.org/t/extracting-user-information-programmatically/19453/3 "2026-08-31T16:38:21Z")

</div>

@bryantt-v any thoughts?
