Adding non-visible User Custom Fields to the API

Yes, using query parameters:

For example,
https://unicyclist.com/directory_items.json?period=weekly&order=likes_received&name=Flansberrium+G29&user_field_ids=1|2

Restrict the user custom fields to search by modifying the last parameter user_field_ids=1|2.
For example, user_field_ids=5 to search only in the custom field ID 5.

There are also a couple of other available parameters you can find in the API documentation (docs that don’t mention the user fields, but you can easily reverse-engineer the API.

The custom field(s) must have the searchable option checked for the query to work:

image

Also, note that the query will not search only in custom fields, but also in usernames and maybe full names. I think there’s no built-in feature to filter only by custom fields.

3 Likes