From b6ce3ddd0d2f359d1412515a52f0dd5a617fdeef Mon Sep 17 00:00:00 2001 From: Marcel Rebro Date: Wed, 21 Jan 2026 14:20:32 +0100 Subject: [PATCH 1/4] docs: Enhance output schema template property documentation Improve the documentation for the `template` property in output schemas by expanding the property description and adding a comprehensive "Understanding templates" section that explains template processing, syntax, and where generated URLs appear. Changes: - Enhanced template property description with Mustache syntax details - Added "Understanding templates" section explaining: - How the platform processes templates (interpolation, generation, display) - Template syntax with concrete examples - Where templates appear (Console and API) Addresses feedback from GitHub issue #2165. Co-Authored-By: Claude Sonnet 4.5 --- .../actor_definition/output_schema/index.md | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/output_schema/index.md b/sources/platform/actors/development/actor_definition/output_schema/index.md index d4709248db..372918a25f 100644 --- a/sources/platform/actors/development/actor_definition/output_schema/index.md +++ b/sources/platform/actors/development/actor_definition/output_schema/index.md @@ -73,7 +73,7 @@ The output schema defines the collections of keys and their properties. It allow |----------------|--------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------| | `title` | string | true | The output's title, shown in the run's output tab if there are multiple outputs and in API as key for the generated output URL. | | `description` | string | false | A description of the output. Only used when reading the schema (useful for LLMs) | -| `template` | string | true | Defines a template which will be translated into output URL. The template can use variables (see below) | +| `template` | string | true | Defines a URL template that generates the output link. Templates use Mustache-style variable interpolation with {{variable}} syntax. The generated URL appears in the Apify Console Output tab and in the API response's output property. | ### Available template variables @@ -90,6 +90,32 @@ The output schema defines the collections of keys and their properties. It allow | `run.defaultDatasetId` | string | ID of the default dataset | | `run.defaultKeyValueStoreId` | string | ID of the default key-value store | +## Understanding templates + +Templates allow you to dynamically generate URLs that point to your Actor's output. When an Actor run completes, the Apify platform processes each template by: + +1. **Variable interpolation**: Replacing `{{variable}}` placeholders with actual runtime values +2. **URL generation**: Creating the final output URL +3. **Display**: Showing the output in the Apify Console Output tab and including it in the API response + +### Template syntax + +Templates use Mustache-style double curly braces `{{variable}}` for variable interpolation. For example: + +- `{{links.apiDefaultDatasetUrl}}/items` becomes `https://api.apify.com/v2/datasets//items` +- `{{run.containerUrl}}` becomes `https://.runs.apify.net/` + +You can access nested properties using dot notation (e.g., `{{run.defaultDatasetId}}`, `{{links.publicRunUrl}}`). + +### Where templates appear + +The generated URLs from your templates appear in two places: + +1. **Apify Console**: In the Output tab of your Actor run +2. **API Response**: In the `output` property when calling the GET Run endpoint + +The examples below demonstrate various template patterns and their results in both the Console and API. + ## Examples ### Linking default dataset From 29c848873af9ff9cc949f052a42a4bc5c11e511f Mon Sep 17 00:00:00 2001 From: Marcel Rebro Date: Wed, 21 Jan 2026 14:26:30 +0100 Subject: [PATCH 2/4] fix: Correct bold formatting in output schema documentation Fix bold usage to comply with Apify style guide by: - Remove bold from list items used for emphasis - Apply bold only to UI elements (Output tab) - Fix Apify Console terminology (remove "the") Following APIFY_STANDARDS.md text formatting standards where bold is used exclusively for UI elements, not for emphasis. Co-Authored-By: Claude Sonnet 4.5 --- .../actor_definition/output_schema/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/platform/actors/development/actor_definition/output_schema/index.md b/sources/platform/actors/development/actor_definition/output_schema/index.md index 372918a25f..8340db94d2 100644 --- a/sources/platform/actors/development/actor_definition/output_schema/index.md +++ b/sources/platform/actors/development/actor_definition/output_schema/index.md @@ -73,7 +73,7 @@ The output schema defines the collections of keys and their properties. It allow |----------------|--------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------| | `title` | string | true | The output's title, shown in the run's output tab if there are multiple outputs and in API as key for the generated output URL. | | `description` | string | false | A description of the output. Only used when reading the schema (useful for LLMs) | -| `template` | string | true | Defines a URL template that generates the output link. Templates use Mustache-style variable interpolation with {{variable}} syntax. The generated URL appears in the Apify Console Output tab and in the API response's output property. | +| `template` | string | true | Defines a URL template that generates the output link. Templates use Mustache-style variable interpolation with {{variable}} syntax. The generated URL appears in Apify Console **Output** tab and in the API response's output property. | ### Available template variables @@ -94,9 +94,9 @@ The output schema defines the collections of keys and their properties. It allow Templates allow you to dynamically generate URLs that point to your Actor's output. When an Actor run completes, the Apify platform processes each template by: -1. **Variable interpolation**: Replacing `{{variable}}` placeholders with actual runtime values -2. **URL generation**: Creating the final output URL -3. **Display**: Showing the output in the Apify Console Output tab and including it in the API response +1. Variable interpolation: Replacing `{{variable}}` placeholders with actual runtime values +2. URL generation: Creating the final output URL +3. Display: Showing the output in Apify Console **Output** tab and including it in the API response ### Template syntax @@ -111,8 +111,8 @@ You can access nested properties using dot notation (e.g., `{{run.defaultDataset The generated URLs from your templates appear in two places: -1. **Apify Console**: In the Output tab of your Actor run -2. **API Response**: In the `output` property when calling the GET Run endpoint +1. Apify Console: In the **Output** tab of your Actor run +2. API Response: In the `output` property when calling the GET Run endpoint The examples below demonstrate various template patterns and their results in both the Console and API. From a729695ddc56c8e5b5f95c4927ef12d002f1d3fc Mon Sep 17 00:00:00 2001 From: Marcel Rebro Date: Wed, 21 Jan 2026 14:27:48 +0100 Subject: [PATCH 3/4] fix: Change heading to simple present tense Change "Understanding templates" to "Understand templates" to follow Apify style guide requirement for simple present tense headings. Avoid gerund (-ing) forms in headings per APIFY_STANDARDS.md. Co-Authored-By: Claude Sonnet 4.5 --- .../actors/development/actor_definition/output_schema/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/output_schema/index.md b/sources/platform/actors/development/actor_definition/output_schema/index.md index 8340db94d2..88e11d5def 100644 --- a/sources/platform/actors/development/actor_definition/output_schema/index.md +++ b/sources/platform/actors/development/actor_definition/output_schema/index.md @@ -90,7 +90,7 @@ The output schema defines the collections of keys and their properties. It allow | `run.defaultDatasetId` | string | ID of the default dataset | | `run.defaultKeyValueStoreId` | string | ID of the default key-value store | -## Understanding templates +## Understand templates Templates allow you to dynamically generate URLs that point to your Actor's output. When an Actor run completes, the Apify platform processes each template by: From 1f6f73bed90ccd70a0195ad714f1fae9b897f7d0 Mon Sep 17 00:00:00 2001 From: Marcel Rebro Date: Wed, 21 Jan 2026 14:29:29 +0100 Subject: [PATCH 4/4] docs: Apply PR review suggestions - Remove "Mustache-style" from template syntax description - Lowercase "API Response" to "API response" for consistency Co-Authored-By: Claude Sonnet 4.5 --- .../development/actor_definition/output_schema/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/platform/actors/development/actor_definition/output_schema/index.md b/sources/platform/actors/development/actor_definition/output_schema/index.md index 88e11d5def..ea31262755 100644 --- a/sources/platform/actors/development/actor_definition/output_schema/index.md +++ b/sources/platform/actors/development/actor_definition/output_schema/index.md @@ -100,7 +100,7 @@ Templates allow you to dynamically generate URLs that point to your Actor's outp ### Template syntax -Templates use Mustache-style double curly braces `{{variable}}` for variable interpolation. For example: +Templates use double curly braces `{{variable}}` for variable interpolation. For example: - `{{links.apiDefaultDatasetUrl}}/items` becomes `https://api.apify.com/v2/datasets//items` - `{{run.containerUrl}}` becomes `https://.runs.apify.net/` @@ -112,7 +112,7 @@ You can access nested properties using dot notation (e.g., `{{run.defaultDataset The generated URLs from your templates appear in two places: 1. Apify Console: In the **Output** tab of your Actor run -2. API Response: In the `output` property when calling the GET Run endpoint +2. API response: In the `output` property when calling the GET Run endpoint The examples below demonstrate various template patterns and their results in both the Console and API.