> 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

Veja como escrever instruções de parsing manualmente para lidar com casos extremos ou personalizar a lógica de análise.

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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
