To know more about Custom fields, check this article.
Pipedrive lets you create custom fields through
Creation, Manipulation, Data Types
You can find comprehensive information from our developer docs on the creation & manipulation of custom fields with code samples.
Search based on custom fields
With the itemSearch API, you can perform search on custom fields of certain item types.
Retrieving the actual name of custom fields in the API
Although there is no direct API that can do that, you can consider some of the approaches mentioned in this related wiki to do the transformation.