> 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/result-processing-and-storage/cloud-storage/file-name-templating.md).

# Modelagem do nome do arquivo

Aprenda a especificar nomes de arquivo para resultados entregues ao seu armazenamento em nuvem.

Por padrão, os arquivos de resultado entregues ao seu armazenamento em nuvem usam o `{{ job_id }}.{{ extension }}` template de nomenclatura (por exemplo, `7346445033316311041.json`). Você pode especificar um template personalizado de nome de arquivo para os resultados entregues ao seu armazenamento em nuvem.

Veja por que você pode querer fazer isso:

* Os nomes dos arquivos de resultado podem ser mais informativos
* Os resultados podem ser organizados automaticamente em diferentes diretórios.

## Variáveis do template

Você pode usar qualquer parâmetro de entrada que fornecer ao criar um job, bem como qualquer variável do `job` objeto retornado com seus resultados (por exemplo `job_id`, `source`, `created_at`) em seu template de nomenclatura de arquivos. O `storage_url` campo da resposta do job mostra o caminho resolvido, então você pode verificar um template sem esperar pelo upload.

## Uso

{% stepper %}
{% step %}

#### Exemplo 1: Nome de arquivo personalizado com várias variáveis

Grava o resultado em `oxylabs.test/google_search_test_7336001481897673729.json`

```json
{
    "source": "google_search",
    "query": "test",
    "storage_type": "s3",
    "storage_url": "oxylabs.test/{{ source }}_{{ query }}_{{ job_id }}.{{ extension }}"
}
```

{% endstep %}

{% step %}

#### Exemplo 2: Organização de diretório

Grava o resultado em `oxylabs.test/google_search/7336001481897673729.json`

```json
{
    "source": "google_search",
    "query": "test",
    "storage_type": "s3",
    "storage_url": "oxylabs.test/{{ source }}/"
}
```

{% endstep %}

{% step %}

#### Exemplo 3: Diretório personalizado com nome de arquivo personalizado

Grava o resultado em `oxylabs.test/google_search/oxylabs_test_7336001481897673729.json`

```json
{
    "source": "google_search",
    "query": "test",
    "storage_type": "s3",
    "storage_url": "oxylabs.test/{{ source }}/oxylabs_{{ query }}_{{ job_id }}.{{ extension }}"
}
```

{% endstep %}
{% endstepper %}


---

# 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/result-processing-and-storage/cloud-storage/file-name-templating.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.
