Predefinições de parser
Descubra como as predefinições de parser funcionam e como usá-las em seus jobs de scraping.
Atualizado
Isto foi útil?
Isto foi útil?
{
"self_heal": true,
"urls": ["https://sandbox.oxylabs.io/products"],
"prompt_schema": {
"properties": {
"product_titles": {
"description": "Título de cada produto.",
"items": {
"type": "string"
},
"maxItems": 5,
"title": "Títulos dos produtos",
"type": "array"
}
},
"required": [
"product_titles"
],
"title": "Campos",
"type": "object"
}
}{
"name": "my_new_parser",
"description": "Extrair texto de todos os elementos H4 na página.",
"parsing_instructions": {
"titles": {
"_fns": [
{
"_args": ["//h4/text()"],
"_fn": "xpath"
}
]
}
}
}{
"id": 421947,
"name": "my_new_parser",
"description": "Extrair texto de todos os elementos H4 na página.",
"prompt_text": null,
"prompt_schema": null,
"urls": [],
"render": false,
"parsing_instructions": {
"titles": {
"_fns": [
{
"_args": [
"//h4/text()"
],
"_fn": "xpath"
}
]
}
},
"self_heal": false,
"heal_status": "disabled",
"last_healed_at": null,
"created_at": "2025-10-27 11:40:22",
"updated_at": "2025-10-27 11:40:22"
}{
"source": "universal",
"url": "https://sandbox.oxylabs.io/products",
"parse": true,
"parser_preset": "my_new_parser"
}{
"results": [
{
"content": {
"titles": [
"The Legend of Zelda: Ocarina of Time",
"Super Mario Galaxy",
"Super Mario Galaxy 2",
"Metroid Prime",
"Super Mario Odyssey",
"Halo: Combat Evolved",
"The House in Fata Morgana - Dreams of the Revenants Edition -",
"NFL 2K1",
"Uncharted 2: Among Thieves",
"Tekken 3",
"The Legend of Zelda: The Wind Waker",
"Gran Turismo",
"Metal Gear Solid 2: Sons of Liberty",
"Grand Theft Auto Double Pack",
"Baldur's Gate II: Shadows of Amn",
"Tetris Effect: Connected",
"The Legend of Zelda Collector's Edition",
"Gran Turismo 3: A-Spec",
"The Legend of Zelda: A Link to the Past",
"The Legend of Zelda: Majora's Mask",
"The Last of Us",
"Persona 5 Royal",
"The Last of Us Remastered",
"The Legend of Zelda: Ocarina of Time 3D",
"Chrono Cross",
"Gears of War",
"Sid Meier's Civilization II",
"Halo 3",
"Ninja Gaiden Black",
"Super Mario Advance 4: Super Mario Bros. 3",
"Jet Grind Radio",
"Grim Fandango"
],
"parse_status_code": 12000
},
"created_at": "2025-10-27 11:41:18",
"updated_at": "2025-10-27 11:41:19",
"page": 1,
"url": "https://sandbox.oxylabs.io/products",
"job_id": "7388540292158203905",
"is_render_forced": false,
"status_code": 200,
"type": "parsed",
"parser_type": "preset",
"parser_preset": "my_new_parser"
}
]
}{
"id": 421947,
"name": "my_new_parser",
"description": "Extrair texto de todos os elementos H4 na página.",
"prompt_text": null,
"prompt_schema": null,
"urls": [],
"render": false,
"parsing_instructions": {
"titles": {
"_fns": [
{
"_args": [
"//h4/text()"
],
"_fn": "xpath"
}
]
}
},
"self_heal": false,
"heal_status": "disabled",
"last_healed_at": null,
"created_at": "2025-10-27 11:40:22",
"updated_at": "2025-10-27 11:40:22"
}{
"parsing_instructions": {
"titles": {
"_fns": [
{
"_args": ["//h4/text()"],
"_fn": "xpath"
}
]
},
"prices": {
"_fns": [
{
"_args": [".price-wrapper"],
"_fn": "css"
},
{"_fn": "element_text"}
]
}
}
}{
"id": 421947,
"name": "my_new_parser",
"description": "Extrair texto de todos os elementos H4 na página.",
"prompt_text": null,
"prompt_schema": null,
"urls": [],
"render": false,
"parsing_instructions": {
"prices": {
"_fns": [
{
"_args": [
".price-wrapper"
],
"_fn": "css"
},
{
"_fn": "element_text"
}
]
},
"titles": {
"_fns": [
{
"_args": [
"//h4/text()"
],
"_fn": "xpath"
}
]
}
},
"self_heal": false,
"heal_status": "disabled",
"last_healed_at": null,
"created_at": "2025-10-27 11:40:22",
"updated_at": "2025-10-27 11:44:24"
}[
{
"id": 421950,
"name": "books_parser",
"description": "Faz parsing de todos os títulos de livros na página.",
"prompt_text": null,
"prompt_schema": null,
"urls": [],
"render": false,
"parsing_instructions": {
"titles": {
"_fns": [
{
"_args": [
"//h3//text()"
],
"_fn": "xpath"
}
]
}
},
"self_heal": false,
"heal_status": "disabled",
"last_healed_at": null,
"created_at": "2025-10-27 11:46:59",
"updated_at": "2025-10-27 11:46:59"
},
{
"id": 421947,
"name": "my_new_parser",
"description": "Extrair texto de todos os elementos H4 na página.",
"prompt_text": null,
"prompt_schema": null,
"urls": [],
"render": false,
"parsing_instructions": {
"titles": {
"_fns": [
{
"_args": [
"//h4/text()"
],
"_fn": "xpath"
}
]
}
},
"self_heal": false,
"heal_status": "disabled",
"last_healed_at": null,
"created_at": "2025-10-27 11:40:22",
"updated_at": "2025-10-27 11:45:20"
}
]{
"total_results": 9,
"successful_results": 9,
"success_rate": 100,
"success_rate_by_path": {
"titles": 100
}
}https://data.oxylabs.io/v1/parsers/presets/{preset_name}/stats?date_from=2025-08-05T9&date_to=2025-08-05T14