Answered

Forms endpoint not returning ALL forms


I am trying to retrieve a list of all forms via API (https://api.typeform.com/forms) and the results vary significantly at any given time, with only certain forms being returned and the results have been different day-to-day.

Is there any reason as to why a certain form would not be returned within this list. I can manually retrieve the form id and retrieve responses via responses endpoint but the forms endpoint does not return the form object itself.

icon

Best answer by Liz 15 June 2022, 18:28

View original

10 replies

Userlevel 7
Badge +5

Hi @marssaas thanks for stopping by the community! What is the full call you’re making? Are you using paging at all? 

Userlevel 2
Badge

Are you using paging at all? 

I’m also facing a similar issue in trying to fetch all the forms as unlike the responses there isn’t a token to identify them. I have roughly 300 forms that I need to fetch and check. Is there a way to page them as I’m not sure how to do it either?

Userlevel 7
Badge +5

@propfunnel can you please send the call you’re making? 

@Liz I’m using this endpoint: https://api.typeform.com/forms
 

I’m only passing token to authorize and no other parameters. There are only about 15 forms in total and only about 7 get returned. I haven’t used the pages parameter for this specific call .

Userlevel 7
Badge +5

Thanks, @marssaas but I need the full call, including any parameters you’re adding. 

@Liz 

using python requests library:

response = requests.get(‘https://api.typeform.com/forms’, headers=headers).json()

where headers is my bearer token

Userlevel 2
Badge

@propfunnel can you please send the call you’re making? 

Hi,

 

I’m using the typeform-js-client

 typeformClient
    .forms
    .list(pageSize=100)
    .then((data)=> {
        console.log(data.total_items)
        res.header(200).json(data)
    })
Userlevel 7
Badge +5

Hi @marssaas Thank you! I can’t see anything there that would prevent all the forms from appearing, so in your case, I would suggest contacting our technical team here

For yours, @propfunnel the page size is what is preventing all of them from showing. You either need to increase this or remove it entirely. 

Userlevel 2
Badge

Hi @marssaas Thank you! I can’t see anything there that would prevent all the forms from appearing, so in your case, I would suggest contacting our technical team here

For yours, @propfunnel the page size is what is preventing all of them from showing. You either need to increase this or remove it entirely. 

Hi thank you,

This is part of the result that I’m getting

{"total_items":300,"page_count":30}

Meaning that it retrieves everything but for some reason I don’t know how to toggle through the pages.

Userlevel 7
Badge +5

Thanks, @propfunnel ! You will need to add the page in the query parameters to toggle through the pages. Our documentation here should help!

Reply