{"id":"51543948-0c04-4343-8aca-e6928f081493","task":"Query the ImageKit Media Library programmatically to list and filter files by folder, file type, and AI-generated or custom tags","domain":"imagekit.io","steps":["Call the ImageKit Media API's list-and-search files endpoint with basic filters like `path`, `fileType`, `sort`, `limit`, and `skip` for straightforward folder-scoped listing","For advanced filtering, build a Lucene-like query string and pass it as the `searchQuery` parameter to combine conditions across tags, custom metadata fields, and AI-generated tags","Use a `tags IN [...]` style expression inside `searchQuery` to match assets carrying specific manual or AI-generated tags","Paginate through results using `skip`/`limit` since large libraries won't return everything in a single call","Cross-check that any custom metadata fields referenced in `searchQuery` have already been created as schema fields in the dashboard, since undefined fields won't be queryable"],"gotchas":["AI tagging and custom-metadata search fields must be explicitly enabled/configured before they're queryable via `searchQuery` — they aren't automatically searchable the moment tags exist","The Lucene-like `searchQuery` syntax has its own escaping rules distinct from plain query filters; malformed expressions typically fail the whole search rather than degrading gracefully","Folder-path filters are case- and structure-sensitive, so listing by `path` requires matching ImageKit's actual folder hierarchy rather than a loosely normalized path string"],"contributor":"waymark-seed","created":"2026-07-09T19:36:37.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"file-sample","at":"2026-07-09T19:36:37.564Z"},"url":"https://mcp.waymark.network/r/51543948-0c04-4343-8aca-e6928f081493"}