API: How to retrieve Single Choice and Dropdown options through API?

  • gkckrks
    Asked on July 7, 2025 at 2:11 AM

    How can I retrieve the options of single choice and dropdown questions through API?

  • Podo: Support AI Agent
    Replied on July 7, 2025 at 2:11 AM

    Hi Gokce,

    Thanks for reaching out to Jotform Support. Let me help you with that:

    To retrieve the options of single choice and dropdown questions through the Jotform API, you need to access the form's questions data via the API. The options for these question types are included in the question details returned by the API.

    Here’s how to do it:

    1. Use the API endpoint to get form questions: GET /form/{formID}/questions.
    2. Look for the question type in the response, such as 'single choice' or 'dropdown'.
    3. Find the 'options' property within the question object, which contains the list of choices for that question.

    This way, you can programmatically retrieve the options for those question types.

    Give it a try and let us know how it goes.

  • gkckrks
    Replied on July 7, 2025 at 2:12 AM

    Can you show me an example form's questions data via the API?

    How will it look?

  • Podo: Support AI Agent
    Replied on July 7, 2025 at 2:12 AM

    Hi Gokce,

    Here is an example of the questions data you get from the API for single choice and dropdown questions:

    {
    "1": {
    "type": "control_dropdown",
    "text": "Select your country",
    "options": {
    "1": "USA",
    "2": "Canada",
    "3": "UK"
    }
    },
    "2": {
    "type": "control_radio",
    "text": "Choose your gender",
    "options": {
    "1": "Male",
    "2": "Female",
    "3": "Other"
    }
    }
    }

    This JSON structure shows each question with its type, text, and options as key-value pairs.

  • John JotForm Support
    Replied on July 7, 2025 at 2:46 AM

    Hi Gokce,

    Using Jotform API, you can easily retrieve options of both Single Choice and Dropdown fields. Here are the API requests you could use:

    1. First, get all the questions of the form using the API endpoint below:

    GET https://api.jotform.com/form/{formID}/questions?apiKey={API_KEY}

    Just replace {formID} with your actual form ID and {API_KEY} with your Jotform API key.

    2. You'll then get a JSON response where each question is an object. Here's an example:

    {
     "responseCode": 200,
     "message": "success",
     "content": {
      "1": {
       "qid": "1",
       "type": "control_radio",
       "text": "Pick one option",
       "options": "Option 1|Option 2|Option 3"
      },
      "2": {
       "qid": "2",
       "type": "control_dropdown",
       "text": "Select from dropdown",
       "options": "Choice A|Choice B|Choice C"
      }
     }
    }

    You’ll want to look through the JSON response from the API and check the type of each question. If the type is either control_radio for Single Choice or control_dropdown for Dropdown, just keep its qid since that’s the question ID you’ll use to get the options later.

    3. Now, get the options for each Single Choice and Dropdown question, use the question ID you got from the previous step and use this API request:

    GET https://api.jotform.com/question/{questionID}?apiKey={API_KEY}

    Again, just replace {API_KEY} with your actual Jotform API Key and the {questionID} with the question ID you got.

    And that's it. You'll be able to retrieve the options of all Single Choice and Dropdown fields of a form. You can also check out Jotform API documentation for more information.

    Additionally, you'll need to use at least a read access API key to get that working. It's easy to generate an API key in your Jotform account. Let me show you how:

    1. On your My Workspace page, click on your Avatar/Profile Image in the top-right corner of the screen.

    2. In the window that opens, click on Settings.

    How to include options in Dropdown field from External Source Image 1 Screenshot 40 Screenshot 10

    3. Then, click on the API tab on the left.

    4. In the API Keys section, click on Create New Key.

    How to include options in Dropdown field from External Source Image 2 Screenshot 51 Screenshot 21

    5. Once your new API Key is created, you can switch between Read Access or Full Access, and you're done.

    How to include options in Dropdown field from External Source Image 3 Screenshot 62 Screenshot 32

    You can then copy the API Key and use that on your API calls. You can also check out our guide on How to Create Jotform API Keys to learn more.

    Reach out again if you have any other questions.