---
updatedAt: 2026-03-01T17:54:47.000Z
---

# Search for user profiles

```shell Shell
hostname="https://se-demos-gstemp.us-dev.janraincapture.com"

curl -L -X POST "$hostname/entity.find" \
-H 'Authorization: Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hrN2N6YnZ1eng2ZHB0ZTVrOXA2ZGo1Ynpla3U=' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'type_name=user' \
--data-urlencode 'filter=primaryAddress.company='\''Akamai'\'' and primaryAddress.country='\''US'\''' \
--data-urlencode 'attributes=["givenName","familyName","primaryAddress.city","primaryAddress.stateAbbreviation"]' \
--data-urlencode 'sort_on=["familyName","givenName"]' \
```

```node Node
const hostname="https://se-demos-gstemp.us-dev.janraincapture.com"

var request = require('request');
var options = {
  'method': 'POST',
  'url': hostname.concat("/entity.find"),
  'headers': {
    'Authorization': 'Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hrN2N6YnZ1eng2ZHB0ZTVrOXA2ZGo1Ynpla3U=',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    'type_name': 'user',
    'filter': 'primaryAddress.company=\'Akamai\' and primaryAddress.country=\'US\'',
    'attributes': '["givenName","familyName","primaryAddress.city","primaryAddress.stateAbbreviation"]',
    'sort_on': '["familyName","givenName"]'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

```python Python
hostname="https://se-demos-gstemp.us-dev.janraincapture.com"

import requests

url = hostname + "/entity.find"

payload='type_name=user\
&filter=primaryAddress.company%3D\'Akamai\'%20and%20primaryAddress.country%3D\'US\'\
&attributes=%5B%22givenName%22%2C%22familyName%22%2C%22primaryAddress.city%22%2C%22primaryAddress.stateAbbreviation%22%5D\
&sort_on=%5B%22familyName%22%2C%22givenName%22%5D'
headers = {
  'Authorization': 'Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hrN2N6YnZ1eng2ZHB0ZTVrOXA2ZGo1Ynpla3U=',
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

```json Response Example
{
  "result_count": 1,
  "results": [
    {
      "familyName": "Naif",
      "givenName": "Karim",
      "primaryAddress": {
        "city": "Ridgefield",
        "stateAbbreviation": "WA"
      }
    }
  ],
  "stat": "ok"
}
```

# Get your Identity Cloud hostname

<!-- shell@1 -->
<!-- node@1 -->
<!-- python@1 -->

Your Identity Cloud hostname can be found on the **Manage Application** page in Console next to the label **Registration Domain(s)**.

# Get authorization

<!-- shell@4 -->
<!-- node@8 -->
<!-- python@12 -->

This operation requires Basic authentication. Use the client ID of an API client assigned the **owner** or the **direct_access** feature as your username and the client secret of that client as your password. See <a href = "https://techdocs.akamai.com/identity-cloud-entity/reference/get-started" target="_blank">Get started</a> for more information.

# Configure the content type

<!-- shell@5 -->
<!-- node@9 -->
<!-- python@13 -->

Set the **Content-Type** header to **application/x-www-form-urlencoded**. This causes request data to be sent as a single URL encoded string.

# Configure the entity type

<!-- shell@6 -->
<!-- node@12 -->
<!-- python@7 -->

Name of the user profile database where the user accounts are stored. By default, user profiles are stored in the **user** entity type.

# Configure the search filter

<!-- shell@7 -->
<!-- node@13 -->
<!-- python@8 -->

Expression used to limit the returned data to user records that meet the filter conditions. For example, the filter **birthday is null** returns all records where the **birthday** attribute is **null**. 

See <a href="https://techdocs.akamai.com/identity-cloud/docs/additional-entity-and-entity-type-api-examples" target = "_blank">Additional Entity and Entity Type API examples</a> for sample search filters.

# Configure the attributes to be returned

<!-- shell@8 -->
<!-- node@14 -->
<!-- python@9 -->

Array containing the names of the attributes returned for each user meeting the search criteria. If omitted, all the user profile attributes are returned.

# Configure the sort order

<!-- shell@9 -->
<!-- node@15 -->
<!-- python@10 -->

Array of attribute names that specify the sort order for the API response. For example, to sort results by last name and then by first name, set **sort_on** to this: **["familyName", "givenName"]**.

This operation sorts results by using ASCII order. By default, results are sorted in ascending (A to Z) order. To sort in descending order (Z to A) , place a minus sign (-) directly in front of the appropriate attribute. For example: **-displayName**. 

If the sort order isn't important we recommend that you still include the **sort_on** parameter and set the value to an empty array: **sort_on='[]'**. Doing this typically speeds up the return of an unsorted query.

# Call the API

<!-- shell@3 -->
<!-- node@18-21 -->
<!-- python@16 -->

Use the POST method to search for the user accounts.

# Review the response



If successful, the API includes user profile information for all the user accounts that meet the search criteria.