# Request Params Example

> Learn how to access URL parameters using g.req.params in API Maker with a clear example.

Source: https://docs.apimaker.dev/v1/examples/req/params/reqParams.html

To get the value of requested params, use `g.req.params`.

```ts
const req_params = g.req.params;
```

The tenant of the request, for a [multi-tenant](https://docs.apimaker.dev/v1/docs/features/multi-tenant.html) instance: named with the [x-am-tenant-username](https://docs.apimaker.dev/v1/docs/apis-all/header/requestHeader.html#x-am-tenant-username) header, or in the path of an API of the instance (`crm::acme`).

```ts
const tenantUsername = g.req.params.tenantUsername; // 'acme', undefined without a tenant
```

## Related

- [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html) · [Custom APIs](https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html)
