How to get company postcode (zip code)

Hello,
I am trying to retrieve data from HubSpot using Hubspot API for python GitHub - HubSpot/hubspot-api-python: HubSpot API Python Client Libraries for V3 version of the API · GitHub.
My code is:
from hubspot import HubSpot
from hubspot.auth.oauth import ApiException

api_client = HubSpot()

client_id = “#####”
client_secret = “#####”
code = ‘#####’
try:
tokens = api_client.auth.oauth.tokens_api.create_token(
grant_type=“authorization_code”,
redirect_uri=“https://www.example.com/auth-callback”,
client_id=client_id,
client_secret=client_secret,
code=code
)
except ApiException as e:
print(“Exception when calling create_token method: %s\n” % e)
api_client = HubSpot(access_token=tokens.access_token)

all_companies = api_client.crm.companies.get_all()
print(all_companies)
However, this request returns me some info about companies. Properties field contains info:

'properties': {'createdate': '2022-04-11T09:35:55.818Z',
 'domain': 'mycompany.com',
 'hs_lastmodifieddate': '2022-04-11T09:38:27.998Z',
 'hs_object_id': '1234567',
 'name': 'My Company'},

I need address and postcode for the company. In my account this info is available, I see that this info comes from HubSpot Insights database.
Could you please suggest me how to get company address in my case?
Many thanks!

Hi, @mpal5 :waving_hand: Thanks for reaching out. Hey @taran42, do you have any Python expertise you can share with @mpal5?

Best,

Jaycee

@mpal5 I’m less familiar with v3 as v2, but I think they work the same way as in you need to call the properties you are looking for. From the v3 GitHub documentation:

try:
 simple_public_object_input = SimplePublicObjectInput(
 properties={"email": "email@example.com"}
 )

So you need to call the address and postcode properties in place of email.

Thank you @taran42 !
It works for me in this way:
all_companies = api_client.crm.companies.get_all(properties=“city”,“state”,“country”,“zip”,“domain”, “industry”, “name”])