# Use return value of client.crm.objects.search\_api.do\_search

**URL:** <https://community.hubspot.com/t/use-return-value-of-client-crm-objects-search-api-do-search/119491>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [October 30, 2024, 11:21am UTC](https://community.hubspot.com/t/use-return-value-of-client-crm-objects-search-api-do-search/119491 "2024-10-30T11:21:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KVerheyen](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@KVerheyen](https://community.hubspot.com/u/KVerheyen)\
**Post date:** [October 30, 2024, 11:21am UTC](https://community.hubspot.com/t/use-return-value-of-client-crm-objects-search-api-do-search/119491/1 "2024-10-30T11:21:00Z")

</div>

I’m having difficulties in using the return value that comes back from the usage of the call of client.crm.objects.search\_api.do\_search.

I get the following print using pprint

{‘paging’: None,  
‘results’: [{‘archived’: False,  
‘archived\_at’: None,  
‘created\_at’: datetime.datetime(2023, 10, 9, 10, 26, 14, 361000, tzinfo=tzutc()),  
‘id’: ‘10643518851’,  
‘properties’: {‘hs\_createdate’: ‘2023-10-09T10:26:14.361Z’,  
‘hs\_lastmodifieddate’: ‘2024-03-14T11:20:38.236Z’,  
‘hs\_object\_id’: ‘10643518851’},  
‘properties\_with\_history’: None,  
‘updated\_at’: datetime.datetime(2024, 3, 14, 11, 20, 38, 236000, tzinfo=tzutc())}],  
‘total’: 1}

But failing in getting the value in the id in a variable in my python script … newby issues …

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [October 30, 2024, 10:34pm UTC](https://community.hubspot.com/t/use-return-value-of-client-crm-objects-search-api-do-search/119491/2 "2024-10-30T22:34:39Z")

</div>

Hi @KVerheyen 👋

Contrary to most Python use cases involving dictionary-like objects, you’ll need to use dot notation when interacting with API responses made available HubSpot’s Python client library. For example, you may want to try something like this as a starting point:

```lia-code-sample
response = api_client.crm.contacts.search_api.do_search(public_object_search_request=my_public_object_search_request)
for contact in response.results:
 print(contact.id)

```

I hope that proves helpful. Please let me know if you have any follow-up questions.
