--- title: "Get Cache Value" url: https://docs.catalyst.zoho.com/en/api/code-reference/cloud-scale/cache/get-cache-value/ description: "This API enables you to retrieve the value of a cache item from a segment in the cache." last_updated: 2026-08-17T12:16:04Z service: Cloud Scale type: api --- # Get the Value of a Cache Key ### Description This API enables you to retrieve the value of a cache item from a [segment in the cache](https://docs.catalyst.zoho.com/en/cloud-scale/help/cache/introduction/). The segment is referred by its unique segment ID, and you must pass the key of the cache item in the request. This API enables you to insert a key-value pair as the cache item in a cache segment. The segment is referred by its unique ID. The key represents the attribute and the value is the data of the cache item. You can also optionally specify the expiry time of the cache item. The default and maximum validity of a cache item is two days. ### Request Details #### Request URL `GET` {api-domain}/baas/v1/project/{project_id}/segment/{segment_id}/cache?cacheKey={cache_key} - **api-domain** (URL): The DC-specific domain to access Catalyst API - **project_id** (Numerical): The [unique ID](https://docs.catalyst.zoho.com/en/getting-started/set-up-a-catalyst-project/general-settings/) of the project - **segment_id** (Numerical): The [unique ID](https://docs.catalyst.zoho.com/en/cloud-scale/help/cache/implementation/#create-a-segment) of the cache segment #### Query Parameters - **cache_key** (String): The [unique key](https://docs.catalyst.zoho.com/en/cloud-scale/help/cache/key-concepts/#cache-items) in a segment whose value needs to be retrieved #### Request Headers **Authorization:** Zoho-oauthtoken {oauth_token} **Optional Headers** **CATALYST-ORG:** {org_id} **Environment:** Development #### Scope ZohoCatalyst.cache.READ ### Response Details The response will return the details of the cache item such as the `cache_name`, `cache_value` and `expires_in`, along with the details of its segment. **Sample Request** ```bash curl -X GET \ https://api.catalyst.zoho.com/baas/v1/project/4000000006007/segment/31000000006023/cache?cacheKey=counter \ -H "Authorization: Zoho-oauthtoken 1000.910*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*16.2f*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*57" ``` **Sample Response** ```json { "status": "success", "data": { "cache_name": "counter", "cache_value": "1344", "project_details": { "id": 4000000006007, "project_name": "ShipmentTracking", "project_type": "Live" }, "segment_details": { "id": 31000000006023, "segment_name": "MailCounters" }, "expires_in": "2019-03-13T18:36:02+05:30", "expiry_in_hours": 3, "ttl_in_milliseconds": 81187000 } } ``` ### SDK Documentation [Retrieve Data from Cache- Java SDK](https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/cache/retrieve-data-from-cache)

[Retrieve Data from Cache- Node.js SDK](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/cache/retrieve-data-from-cache)

[Retrieve Data from Cache- Python SDK](https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/cache/retrieve-data-from-cache)