pythontypeform

how to get typeforms content of ALL pages via typeforms .list() method?


I want to pull all my data from typeforms. I want to use a list with all "form IDs" and I'm using the typeform client wrapper to do that.

When I'm using the .list() method (which should give me all forms) it only gives me only the ones on the first page.

I am looking for a way to specify how many pages/ what page I want to get the contents of.

Any help is greatly appreciated!

    from typeform import Typeform

    typeform = Typeform(api_key) 
    form = typeform.forms
    forms = form.list()
    print(forms)

    #gives me:
    total_items': 60,
    'page_count': 6,
    'items': #here only the first 10/60

Solution

  • Assuming you are using this package Looks you can paginate using form.list() passing some extra parameters.

    According to the Typeform documentation, the maximum number of forms you can retrieve per page is 200.

    Which should be plenty for your needs.

    Passing page size to forms.list function will get you all your forms.

    forms: dict = typeform.forms.list(1,200)

    Let me know if you encounter any issues.