# Encoding URL Parts

If you use the `params` section of the config, `@pixiebrix/get` brick will automatically URL encode the values you provide.

Many RESTful APIs however vary the URL path for resources. In these cases, you must manually encode the value to avoid problems with spaces and special characters

Currently, the best way to do this is using the nunjucks template engine support. For the variable, use the `urlencode` filter followed by a `safe` filter. The `safe` filter prevents additional escaping. For more information on these nunjucks filters, see [the nunjucks filter documentation](https://mozilla.github.io/nunjucks/templating.html#urlencode)

```yaml
- id: "@pixiebrix/get"
  template: nunjucks
	config:
    service: "@rapidapi"
		url: https://omgvamp-hearthstone-v1.p.rapidapi.com/cards/{{ value | urlencode | safe }}

```


---

# Agent Instructions: 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:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/working-with-apis/encoding-url-parts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
