How to use DataService.query to Query on custom field

I added a custom Field with name Demo
I want to use "DataService.query " Api to get all those records who “Demo” (custom created field) is null.

How can i user custom column name in the parameter of DataService.query

When using a custom field as a condition or to get the field data back, you have to add a underscore “_” in front of the custom field table name name. So if your field is called “Demo”, you would query with “_Demo”.

As for querying for “is null”, take a look at the docs here for some different ways to do conditions: xml-rpc - Keap Developer Portal

So the way to do “is null” then would be “_Demo” => “~null~”.

Adding to what @Daniel_Watson has offered, be sure to get the actual database name not just the label, as it can sometimes have a number added to the end of it and it won’t work otherwise.