> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/pt-br/web-scraper-api/features/custom-parser/writing-instructions-manually.md).

# Escrevendo instruções manualmente

Embora o Custom Parser ajude você a automatizar a análise de dados com recursos baseados em IA, você também pode escrever instruções de parsing manualmente usando expressões CSS e XPath. Isso lhe dá a opção de **tratar casos de borda** ou **personalizar a lógica de parsing** para cenários específicos.

O Custom Parser requer estes parâmetros obrigatórios ao criar um job:

* `parse` definido como `verdadeiro`
* `parsing_instructions` contendo um objeto JSON com suas regras de extração

Quando estiver satisfeito com sua lógica de parsing personalizada, você pode salvar as instruções como uma [predefinição de parser](/products/pt-br/web-scraper-api/features/custom-parser/parser-presets.md).

Confira nossos guias completos abaixo, onde você encontra exemplos práticos, boas práticas para expressões XPath e uma referência completa de todas as funções de parsing disponíveis.

{% content-ref url="/pages/5692a1f6241d30d2c68074029f7bcf282b1d041f" %}
[Exemplos de instruções de parsing](/products/pt-br/web-scraper-api/features/custom-parser/writing-instructions-manually/parsing-instruction-examples.md)
{% endcontent-ref %}

{% content-ref url="/pages/2d23f8c3d3784854abed7f6ba85ec3d5950e0942" %}
[Dicas para escrever expressões XPath](/products/pt-br/web-scraper-api/features/custom-parser/writing-instructions-manually/tips-for-writing-xpath-expressions.md)
{% endcontent-ref %}

{% content-ref url="/pages/69a77f9f80386f5349af2e7706811cf2b108609a" %}
[Lista de funções de parsing](/products/pt-br/web-scraper-api/features/custom-parser/writing-instructions-manually/list-of-functions.md)
{% endcontent-ref %}

{% content-ref url="/pages/a86948f4a6e8c071ccf2215cba22e3f1097af371" %}
[Exemplos de funções de parsing](/products/pt-br/web-scraper-api/features/custom-parser/writing-instructions-manually/list-of-functions/function-examples.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/products/pt-br/web-scraper-api/features/custom-parser/writing-instructions-manually.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
