1.9 KiB
1.9 KiB
Output Schema Reference
The Actor output schema builds upon the schemas for the dataset and key-value store. It specifies where an Actor stores its output and defines templates for accessing that output. Apify Console uses these output definitions to display run results.
Structure
{
"actorOutputSchemaVersion": 1,
"title": "<OUTPUT-SCHEMA-TITLE>",
"properties": {
/* define your outputs here */
}
}
Example
{
"actorOutputSchemaVersion": 1,
"title": "Output schema of the files scraper",
"properties": {
"files": {
"type": "string",
"title": "Files",
"template": "{{links.apiDefaultKeyValueStoreUrl}}/keys"
},
"dataset": {
"type": "string",
"title": "Dataset",
"template": "{{links.apiDefaultDatasetUrl}}/items"
}
}
}
Output Schema Template Variables
links(object) - Contains quick links to most commonly used URLslinks.publicRunUrl(string) - Public run url in formathttps://console.apify.com/view/runs/:runIdlinks.consoleRunUrl(string) - Console run url in formathttps://console.apify.com/actors/runs/:runIdlinks.apiRunUrl(string) - API run url in formathttps://api.apify.com/v2/actor-runs/:runIdlinks.apiDefaultDatasetUrl(string) - API url of default dataset in formathttps://api.apify.com/v2/datasets/:defaultDatasetIdlinks.apiDefaultKeyValueStoreUrl(string) - API url of default key-value store in formathttps://api.apify.com/v2/key-value-stores/:defaultKeyValueStoreIdlinks.containerRunUrl(string) - URL of a webserver running inside the run in formathttps://<containerId>.runs.apify.net/run(object) - Contains information about the run same as it is returned from theGET RunAPI endpointrun.defaultDatasetId(string) - ID of the default datasetrun.defaultKeyValueStoreId(string) - ID of the default key-value store