pavel
pavel3d ago

Output Schema

I am trying to add output schema for my actor as specified in https://docs.apify.com/platform/actors/development/actor-definition/output-schema I created a new output_schema.json file and linked it in my actor.json
{
"actorOutputSchemaVersion": 1,
"title": "Scraper Results",
"description": "Scraper Results",
"properties": {
"results": {
"type": "string",
"title": "Results",
"template": "{{links.apiDefaultDatasetUrl}}/items"
}
}
}
{
"actorOutputSchemaVersion": 1,
"title": "Scraper Results",
"description": "Scraper Results",
"properties": {
"results": {
"type": "string",
"title": "Results",
"template": "{{links.apiDefaultDatasetUrl}}/items"
}
}
}
Actor is published and running fine, but in Publication tab it still says "No dataset schema found". Am I missing something?
Actor output schema | Platform | Apify Documentation
Learn how to define and present output of your Actor.
Solution:
Output schema and dataset schema are two separate things. You want to implement this: https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema?fpr=7p4wu
Dataset schema specification | Platform | Apify Documentation
Learn how to define and present your dataset schema in an user-friendly output UI.
Jump to solution
3 Replies
pavel
pavelOP3d ago
Apify
JurisPro Expert Witness Scraper · Apify
Scrape Thousands of Expert Witness profiles from JurisPro.com
Solution
Louis Deconinck
Output schema and dataset schema are two separate things. You want to implement this: https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema?fpr=7p4wu
Dataset schema specification | Platform | Apify Documentation
Learn how to define and present your dataset schema in an user-friendly output UI.
Abdo
Abdo3d ago
Maybe a dataset schema is missing? actor.json
{
"actorSpecification": 1,
"name": "juris-pro-scraper",
"version": "1.0",
"storages": {
"dataset": "./dataset_schema.json"
}
}
{
"actorSpecification": 1,
"name": "juris-pro-scraper",
"version": "1.0",
"storages": {
"dataset": "./dataset_schema.json"
}
}
dataset_schema.json
{
"actorSpecification": 1,
"fields": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"profile_id": {
"type": "number"
},
"profile_url": {
"type": "string"
},
"areas_of_expertise": {
"type": "array"
}
},
"additionalProperties": true
},
"views": {
"overview": {
"title": "Overview",
"transformation": {
"fields": [
"name",
"profile_id",
"profile_url",
"areas_of_expertise"
]
},
"display": {
"component": "table",
"properties": {
"name": {
"label": "Name",
"format": "text"
},
"profile_id": {
"label": "Profile ID",
"format": "number"
},
"profile_url": {
"label": "Profile URL",
"format": "link"
},
"areas_of_expertise": {
"label": "Areas Of Expertise",
"format": "array"
}
}
}
}
}
}
{
"actorSpecification": 1,
"fields": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"profile_id": {
"type": "number"
},
"profile_url": {
"type": "string"
},
"areas_of_expertise": {
"type": "array"
}
},
"additionalProperties": true
},
"views": {
"overview": {
"title": "Overview",
"transformation": {
"fields": [
"name",
"profile_id",
"profile_url",
"areas_of_expertise"
]
},
"display": {
"component": "table",
"properties": {
"name": {
"label": "Name",
"format": "text"
},
"profile_id": {
"label": "Profile ID",
"format": "number"
},
"profile_url": {
"label": "Profile URL",
"format": "link"
},
"areas_of_expertise": {
"label": "Areas Of Expertise",
"format": "array"
}
}
}
}
}
}

Did you find this page helpful?