Skip to main content
All CollectionsDeveloping Actors
How to set up the Output tab in just 5 minutes
How to set up the Output tab in just 5 minutes

Learn how to add an Output tab with an overview of results to your Actor on the Apify Platform.

Hany Duong avatar
Written by Hany Duong
Updated over 2 months ago

The idea behind the Output tab is to make it more convenient for Actor users to see whether the run results are relevant to their scraping request right away.

In this quick demo, I'll show you how to set up an output tab for your own Actor.

Firstly, you should create a .actor folder in the root of your Actor's source code. Create a actor.json file in this folder, after which you'll have .actor/actor.json (or use existing templates when creating a new Actor).

Screenshot of the code inside the actor.json file

In the next step, copy-paste the following code example into your .actor/actor.json

{
"actorSpecification": 1,
"name": "___ENTER_ACTOR_NAME____",
"title": "___ENTER_ACTOR_TITLE____",
"version": "1.0.0",
"storages": {
"dataset": {
"actorSpecification": 1,
"views": {
"overview": {
"title": "Overview",
"transformation": {
"fields": [
"___EXAMPLE_NUMERIC_FIELD___",
"___EXAMPLE_PICTURE_URL_FIELD___",
"___EXAMPLE_LINK_URL_FIELD___",
"___EXAMPLE_TEXT_FIELD___",
"___EXAMPLE_BOOLEAN_FIELD___"
]
},
"display": {
"component": "table",
"properties": {
"___EXAMPLE_NUMERIC_FIELD___": {
"label": "ID",
"format": "number"
},
"___EXAMPLE_PICTURE_URL_FIELD___": {
"format": "image"
},
"___EXAMPLE_LINK_URL_FIELD___": {
"label": "Clickable link",
"format": "link"
}
}
}
}
}
}
}
}

To check if the file is configured correctly, you can paste the following code at the beginning of your Apify.main() function.

    const output = {
"___EXAMPLE_NUMERIC_FIELD___": 42,
"___EXAMPLE_PICTURE_URL_FIELD___": "https://freeiconshop.com/wp-content/uploads/edd/image-outline-filled.png",
"___EXAMPLE_LINK_URL_FIELD___": "https://developers.apify.com/",
"___EXAMPLE_TEXT_FIELD___": "One result example",
"___EXAMPLE_BOOLEAN_FIELD___": true
}
await Apify.pushData(output)
return

Your Apify.main() function might look like this:

Screenshot of the code inside the main.js file.

Hopefully, Build & Start was successful, and you can see the following result in the Overview table inside the Output tab.

Screenshot of the Output tab displaying during an actor run.

If you see the results in the Overview table, it means you are finished. The very first setup should be pretty quick. Now, just go back to your code, and replace the fields in .actor/actor.json prefixed by ___ENTER* with your Actor's name and title and the ___EXAMPLE* fields with real field names from your Actor's result dataset.

If you want to read technical documentation on the subject, head directly to Apify Docs.

Did this answer your question?