> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get address info

> How to get address info with CRMScript.

## NSLocalizedField\[]\[] getFormattedAddress()

Fetches the formatted address of the company.

```crmscript! theme={null}
Company c;
c.load(2);
NSLocalizedField[][] address;
address = c.getFormattedAddress();

for (Integer i = 0; i < address.length(); i++) {
  for (Integer j = 0; j < address[i].length(); j++) {
    print(address[i][j].GetLabel() + ":" + address[i][j].GetName() + ":" + address[i][j].GetValue() + ":" + address[i][j].GetTooltip() + ":" + address[i][j].GetValueLength().toString() + ":" + address[i][j].GetAddressType() + " ");
  }
  print("\n");
}
```

## Get address using the contact agent

```crmscript theme={null}
NSContactAgent contactAgent;

NSContactEntity contact = contactAgent.GetContactEntity(2);
NSAddress address = contact.GetAddress();
NSLocalizedField[][] fields = address.GetLocalizedAddress();
```

Then you can use a double for-loop to iterate and print fields (as we did in the previous example).


## Related topics

- [Address Provider](/en/api/plugins/quote-connectors/addresses.md)
- [Get Participant Info From Email Address](/en/api/reference/restful/agent/email_agent/get-participant-info-from-email-address.md)
- [Set address info](/en/automation/crmscript/howto/address/set-address.md)
- [AddressInfo](/en/api/plugins/quote-connectors/api/data-carriers/addressinfo.md)
- [SuperOffice.WebApi.Data.EMail GetParticipantInfoFromEmailAddressRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMail_GetParticipantInfoFromEmailAddressRequest.md)
- [Get Address](/en/api/reference/restful/agent/person_agent/get-address.md)
