Input and output data

Note

This section describes how to edit the specification in an HTML/JS/CSS editor. You can also learn how to edit the specification in the Template Builder.

In the Data specification section, you set parameters for input and output data. These settings will be valid for all tasks in the project.

In the specification, add fields for the data used in the task or for the data you need in the results. Reference these fields when you configure the interface.

Don't repeat the input data in the output data. You will receive all data, including the input, in the results.

Editing the specification

Note

Specification editing is available only when the Define data specification manually option is enabled.

There are two ways to edit the specification in project settings: using either regular mode or JSON mode. JSON mode gives you more options — you can hide input data and use regular expressions to validate output data.

Regular mode
JSON mode

To add a field in the regular mode, click Add field.

To edit an existing field, hover over the field and click .

Explanations for configuring fields

Data types

You can use different data types:

  • integer
  • float
  • string
  • url
  • boolean
  • coordinates
  • json
  • file
  • array

Recommendations

  • If you edit a required field, the changes apply only to new task pools. For example, if you need to fix an error in a project, clone the pool or create a new one. Existing task pools will continue using the previous version of the project.

  • In the output, use value validation and don't forget to mark the field as required if the Toloker has to fill it in.

  • Hidden fields are intended only for requesters and are not available in the task interface. The values of hidden fields can't be used either in the JS code or in the template constructor.

    Let's say you pass product data (like articles or batch numbers) that Tolokers don't need in order to complete the task. Or you are moderating comments and you need the authors' personal data in the results for further data processing, but the Tolokers shouldn't have access to personal data.

    To create a hidden field, add it to the specification yourself and then add the "hidden": true parameter to this field in JSON mode. You should do this in Toloka when configuring your project. The hidden field remains when the specification is re-generated using the Template Builder.

What's next

See also

Troubleshooting

How do I insert a function that is called by an image click in my task?
How do I add a mask for the input field, like dd.mm.yyyy for the date field or numbers only (10 or 12) for INN (Taxpayer Identification Number)?
Do I need to convert all the images in the task to the same size or can they be different?
If a project's output data may include any number from 1 to 999999, can I specify a range?
How do I show two different versions of the text to Tolokers?
Contact support

Last updated: February 15, 2023

Introduction
Getting started
Important tips
Useful recommendations
Working with Toloka
Projects
Pools
Tasks
Results
Project analysis
Toloka settings
Task interface
Template Builder
HTML/CSS/JS editor
Help and support
FAQTroubleshootingSupportGlossary