
Salesforce Pre-Chat info will be stored in ConversationContextEntry entity when the chat is initiated. So, we can query the ConversationContextEntry entity.

To initiate Salesforce Chat via REST API, please check the following link:
Sample SOQL:
SELECT CustomDetailContextKey, CustomDetailContextValue
FROM ConversationContextEntry
WHERE ParentId = '5705f000000qZpOAAU'

Video Reference: