"SurveyMonkey" (Service Connection)

Connect to the SurveyMonkey API using the Wolfram Language to retrieve survey details and analyze responses.

Connecting & Authenticating

    ServiceConnect["SurveyMonkey"] creates a connection to the SurveyMonkey API.

Requests

    ServiceExecute["SurveyMonkey","request",params] sends a request to the connection identified by conn, using parameters params. The following give possible requests.

    Survey Results for Each Respondent

    Request:

    "SurveyResults" retrieve questions and answers for a given survey

    Parameters:
  • "SurveyID"(required)the ID of the desired survey
  • List of All Your Surveys

    Request:

    "SurveyList" search surveys by date or other criteria

    Parameters:
  • MaxItems10number of elements to return
    "StartIndex"1start index
    "Fields"Nonefields to be included in the result
    "StartDate"Nonesurveys created after this date
    "EndDate"Nonesurveys created before this date
    "Title"Nonenickname of survey to search against
    "RecipientMail"Nonesurveys sent to this email
  • Survey Details

    Request:

    "SurveyDetails" retrieve a given survey's metadata.

    Parameters:
  • "SurveyID"(required)the ID of the desired survey
  • List of All Your Collectors for a Survey

    Request:

    "CollectorList" retrieve a paged list of collectors for a survey

    Parameters:
  • "SurveyID"(required)the ID of the desired survey
    MaxItems10number of elements to return
    "StartIndex"1start index
    "Fields"Nonefields to be included in the result
    "StartDate"Nonecollectors created after this date
    "EndDate"Nonecollectors created before this date
    "Name"Nonenickname of collector to search against
  • Status of Surveys in a Collector

    Request:

    "ResponseCounts" returns how many respondents have started and/or completed the survey for the given collector

    Parameters:
  • "CollectorID"(required)the ID of the desired collector
  • List of All Respondents in a Survey

    Request:

    "RespondentList" retrieves a paged list of respondents for a given survey and optionally, a collector

    Parameters:
  • "SurveyID"(required)the ID of the desired survey
    MaxItems10number of elements to return
    "StartIndex"1start index
    "CollectorID"Nonethe ID of a specific collector to filter results
    "Fields"Nonefields to be included in the result
    "StartDate"Nonerespondents created after this date
    "EndDate"Nonerespondents created before this date
    "StartModifiedDate"Nonerespondents modified after this date
    "EndModifiedDate"Nonerespondents modified before this date
    "SortBy"Nonecolumn to sort results by
  • Survey Result IDs for a List of Respondents

    Request:

    "Responses" takes a list of respondent IDs and returns the responses that correlate to them

    Parameters:
  • "SurveyID"(required)the ID of the desired survey
    "RespondentID"(required)list of "RespondentID" to retrieve
  • User Data

    Request:

    "UserData" returns basic information about the logged-in user

    List of Templates

    Request:

    "TemplateList" retrieves a paged list of templates provided by SurveyMonkey

    Parameters:
  • MaxItems10number of elements to return
    "StartIndex"1start index
    "Language"Nonelanguage to filter templates with; accepts strings and language Entity
    "CategoryID"Nonecategory ID to filter templates with
    "Fields"Nonefields to be included in the result
    "AvailableToUser"Noneif set to True, filter templates to only show the ones available to the current user
  • Create Weblink Collector

    Request:

    "CreateWeblinkCollector" create a weblink used to collect survey responses

    Parameters:
  • "SurveyID"(required)the ID of the desired survey
    "Name"Noneoptional name to give to the collector

Parameter Details

    Possible values for "Fields" in the request "SurveyList" include:
  • "Title"survey name
    "DateCreated"date survey was created
    "DateModified"date survey was last modified
    "Language"language of survey    
    "QuestionCount"number of questions in the survey
    "NumResponses"number of responses for the survey
    "AnalysisURL"URL to analysis page
    "PreviewURL"URL to preview page
  • Possible values for "Fields" in the request "CollectorList" include:
  • "URL"URL for the collector
    "Open"whether collector is open to collect responses
    "Type"collector type
    "Name"name of the collector
    "DateCreated"date collector was created
    "DateModified"date collector was last modified
  • Possible values for "Fields" in the request "RespondentList" include:
  • "CollectorID"collector ID
    "CollectionMode"way the respondent answered
    "CustomID"custom ID set by client
    "Email"email address for respondent
    "FirstName"first name of respondent
    "LastName"last name of respondent
    "DateStart"date respondent started answering survey
    "DateModified"date respondent last modified their responses
    "RecipientID"ID generated for recipients of survey invitations via email collectors
    "IPAddress"IP address of respondent
    "Status"status of respondent in survey
    "AnalysisURL"URL to analysis page
  • Possible values for "Fields" in the request "TemplateList" include:
  • "Title"title of template
    "Language"language of template
    "CategoryID"ID of template category
    "CategoryName"name of category
    "CategoryDescription"description of category
    "DateCreated"date template was created
    "DateModified"date template was modified
    "QuestionCount"number of questions in the template
    "PageCount"number of pages in the template
    "ShortDescription"short description of template
    "LongDescription"long description of template
    "IsAvailableToCurrentUser"whether current user is allowed to use this template
    "IsFeatured"whether this is a featured template
    "IsCertified"whether this template is certified by SurveyMonkey
    "PreviewURL"URL to preview this template

Examples

Basic Examples  (1)

Create a new connection:

In[1]:=
Click for copyable input
Out[1]=

Retrieve a list of surveys:

In[33]:=
Click for copyable input
Out[33]=

Sort by field and show the top 5:

In[34]:=
Click for copyable input
Out[34]=

Show survey details:

In[35]:=
Click for copyable input
Out[35]=

Retrieve results for a specific "SurveyID":

In[36]:=
Click for copyable input
Out[36]=

Select answers by "RespondentID":

In[37]:=
Click for copyable input
Out[37]=

Extract answers to a given question:

In[38]:=
Click for copyable input
Out[38]=

Get information about survey respondents:

In[40]:=
Click for copyable input
Out[40]=

Get a list of available templates:

In[41]:=
Click for copyable input
Out[41]=

Retrieve results for a given survey:

In[1]:=
Click for copyable input

Collect the responses to a question:

In[2]:=
Click for copyable input

Tally and plot the results:

In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=

See Also

ServiceExecute  ▪  ServiceConnect