Skip to main content
The input and output schema defines the data contract for a Bright Data Scraper Studio IDE collector: which fields a collection run accepts and which structured fields the collector returns.
  • Input schema defines the fields a collection run accepts, such as url, keyword, country, date, or any custom field your interaction code reads from input.
  • Output schema defines the structured fields the scraper returns, based on the data emitted by collect().
Both schemas are configured in the Bright Data Scraper Studio IDE. Schema changes are applied to the production collector when you click Save to Production.

What is the input schema?

The input schema defines the values your scraper can receive at runtime. A scraper often uses a url input, but inputs are not limited to URLs. Depending on the collector logic, inputs can be keywords, locations, dates, IDs, countries, or any custom parameter. Your interaction code reads input values through the input object:
For a keyword-based scraper:
A scraper can also run without user-provided input if the target URL or collection logic is hardcoded in the scraper code.

Define input parameters

To define the input schema in the Bright Data Scraper Studio IDE:
  1. Open your collector in the Scraper Studio IDE.
  2. Go to the Code tab.
  3. Click Add input parameter.
  4. Enter a field name, for example url, keyword, country, or date.
  5. Add an optional description.
  6. Select the field type.
  7. Mark the field as Required if the collector cannot run without it.
  8. Click Save.
  9. Click Save to Production when the collector is ready.
After a collector has already been saved, click Edit schema in the IDE to update its input schema.

What are the input parameter settings?

What do collection inputs look like?

A URL-based collector can accept one or more URLs:
A collector can also accept multiple input fields:
Only fields marked as Required must be provided for every input object. Optional fields can be omitted.

What is the output schema?

The output schema defines the data point structure and how the data is organized. In the Bright Data Scraper Studio IDE, the output schema is usually generated from the object passed to collect().
This produces output fields such as:
When the scraper is saved, Scraper Studio detects the collected data structure and creates or updates the output schema.

Update the output schema

There are two ways to update the output schema: automatically from parser code or manually in the schema editor.

Update the schema automatically

  1. Add or change fields in your parser code.
  2. Run a preview to confirm that required fields return as expected.
  3. Click Save to Production.
  4. If Scraper Studio detects schema changes, click Update schema.
  5. Click Save to Production again.

Update the schema manually

  1. Click Edit schema in the IDE.
  2. Add or edit fields by name and type.
  3. Configure required flags, default values, formatting, validation, or PII settings.
  4. Save the schema.
  5. Click Save to Production.

What is the Output Schema Editor?

The Output Schema Editor defines exactly which fields your collector returns and how each field is validated, formatted and delivered. The editor has two views: Clicking a field row opens the configuration side panel for that field.

How is an output schema structured?

An output schema is a JSON object with a top-level type and a fields object:

What properties can output fields have?

These properties apply to user-defined output fields.

Configure a field in the side panel

The side panel contains field-specific settings.

What default values are available?

Available default values depend on the field type.

What output field types are available?

Scraper Studio supports the following user-defined output field types.

text

Free-form text.
Example value:

number

Integer or decimal number. Numeric strings can be converted to numbers.
Example value:

url

A URL string. Only http:// and https:// URLs are accepted.
Example value:

price

A monetary value represented as a numeric value and currency code.
Example value:
Price format presets:

boolean

A true/false value.
Example value:

date

Date or timestamp value.
Date format presets: Locale formatting can include:
  • Locale, for example en-US, fr-FR, ru-RU
  • Date style: long, medium, short
  • Time style: long, medium, short

country

A two-letter ISO 3166-1 alpha-2 country code.
Example value:

phone

A phone number parsed into structured components.
Example value:

image

A downloaded or referenced image.
When Download is enabled, the file is stored in the configured delivery destination. File downloads are billed separately from page loads where applicable.

video, pdf and doc

These file types use the same download and behavior settings as image.
Supported file field types:

File field output options

For downloaded file fields, such as image, video, pdf, and doc, the output schema editor lets you control how file metadata is returned. These settings appear when the field behavior is set to Object.

Behavior

Use Behavior to choose how the file field is returned.
  • Simple: returns only the downloaded file path or the original remote URL.
  • Object: returns an object with file metadata, such as file_path, remote_url, content_type, file_size, and response_headers, depending on which options are enabled.
Use Object when you need more than the file path, for example when validating file type, checking file size, or debugging download headers.

Include content type

Enable Include content type to include the file MIME type in the output. Example:
Use this to confirm whether the downloaded file is an image, PDF, video, or another media type.

Include file size

Enable Include file size to include the downloaded file size in bytes. Example:
Use this to validate file size, detect empty or unexpectedly large downloads, or troubleshoot failed media processing.

Include response headers

Enable Include response headers to include the HTTP response headers received when Scraper Studio downloads the file. Example:
Response headers can help you debug file downloads, verify content type, inspect cache behavior, and troubleshoot unexpected media responses.

Example output

When Behavior is set to Object and all metadata options are enabled, the output can look like this:

array

An ordered list of values. The element type is defined with items.
Empty array behavior: Array of nested objects:

object

A nested object with its own subfields.

What HTML conversion field types are available?

Example:

How do I validate field values?

Custom validation lets you define JavaScript rules that run on every collected value for a field. Throw an error to mark the value as invalid:
Rows that fail validation are treated as error rows when validation is configured for required output quality.

How do I format field values?

Custom formatting lets you transform a field value before output delivery.
Use custom formatting when built-in formatting options do not match the required output shape.

When do I use collect() vs set_lines()?

The way records are emitted affects the output dataset. Example with collect():
Example with set_lines():

What system fields can I add?

System fields are generated by Scraper Studio. Their names and types are fixed. You can toggle them on or off in the output schema configuration under Additional data. When screenshot, html, or warc are active, the files are downloaded to the configured storage destination.

How do I add a screenshot watermark?

When the screenshot system field is enabled, a watermark can be added to the screenshot. Each watermark item has a label and a data source.

What does a full output schema look like?

Develop a scraper

Step-by-step walkthrough of building a scraper in the IDE

Functions reference

Interaction and parser functions with parameters and examples

Initiate collection and delivery

Trigger collection and deliver output to your destination

Trigger a scraper (API)

Run a published collector for batch collection by API