How to get JSON response of all ResponseId of survey without downloading any CSV and JSON File. | XM Community
Skip to main content

Dear community members and QUALTRICS Team, I have a few questions about QUALTRICS Survey API's which are the following:

1.) How can we get all responseId details of the particular survey in JSON format (Not as ZIP or CSV)?
I have found One API to export files that I am adding below as API 1.1. This gives me the details in CSV format which I can download/write using python code but, I am not looking for it. I need a JSON response to my request without downloading the CSV and JSON file.
API 1.1 https://.qualtrics.com/API/v3/surveys/
>/export-responses//file

2.) My Second Question also partially related to question number 1, Is there any way to get JSON details of users uploaded Image/Video which I have asked as upload file form question in the survey.
Again This information, I am able to get file_url in CSV File as you can see in below example 1. But I want That information in JSON format too.
Example 1:
http://s.qualtrics.com/WRQualtricsControlPanel/File.php?F=F_2PaNXXXXXX

3.) I required a percentage JSON response for the user's reply to the survey question. 
Example 2: Are you an engineer?
1.) Yes
2.) No
Out of 100 people, 70 people reply for Yes and others for No. For that, Can I get a question vies JSON response with 70% for Yes and 30% for No or can we get a separate JSON response of users for Yes and No? Is there any API for that?

4.) Is there any API for getting the total number of responses for survey using date and time filter operation in body param. 
Note: I am getting total response count but can't able to perform the filter operation based on date and time.

Sorry for asking too many questions at a time. please any kind of help would be great for me. Thank you so much.
 

  1. Unfortunately, Since the responce export API only export files of type json (if specified ), we do not have any option here. Check this.

  2. For point 2 and point 3, if you read the export file from step 1 and just extract all the response Id in an array then you can loop this API call for each responseId and get/calculate required fields accordingly.

  3. If we specify 'endDate' in this API, then we could achieve our point 4. Similarly, if we need some specific data only in our response export then specify it in 'includedQuestionIds' parameter.



I have understood what you explain, which is helpful to me thank you so much. Still, I have one more query about how to download survey response videos/Images without login into Qualtrics dashboard like export CSV/JSON/etc file using exportSurveyId.

In Survey response JSON file, I am getting file_id/ file_link which is below mentions:

http://s.qualtrics.com/WRQualtricsControlPanel/File.php?F=F_2Ep0XXXXXXX

How to download/export this file. Is there any API to download this file using X-API-KEY?


https://www.qualtrics.com/community/discussion/comment/28835#Comment_28835If you are using PHP to write your API, then did you tried file_get_contents function?


I am using python script from achieving all above requirements. Can you please give me reference of API or functions ?


https://www.qualtrics.com/community/discussion/comment/28837#Comment_28837Try this


Thanks for the reply. Yes, I have tried this but redirecting to the login page. Not getting any direct video formatted link (e.g. file_name.mp4). Also, view network call to achieve but stuck on the login page instead of getting chunks of video (stream=True). 


In the survey options of the survey for which you are downloading the data, can you try unchecking the "secure participants' files" option and then try downloading the file using url.


In the survey options of the survey for which you are downloading the data, can you try unchecking the "secure participants' files" option and then try downloading the file using url.

Thank you so much for helping the above reply solved my problem like a charm now, I am able to download videos from my file_id URL.😊


Leave a Reply