The empty results you’re seeing are definitely caused by improper URL encoding and special character handling in your API requests. Let me walk through the complete solution covering URL encoding, search endpoint usage, and special character handling.
First, understand that the Knowledge Base search endpoint requires strict URL encoding for all query parameters. Special characters must be encoded according to RFC 3986. Here are the critical encodings:
+ (plus) → %2B
& (ampersand) → %26
= (equals) → %3D
% (percent) → %25
< (less than) → %3C
> (greater than) → %3E
Your failing query “C++ programming” should be encoded as:
GET /api/v2/knowledge/search?query=C%2B%2B%20programming&limit=10
Note that spaces also need encoding (either %20 or +, but %20 is safer for consistency).
However, the better approach for the AEC 2022 Knowledge Base API is to use POST requests instead of GET. POST requests accept the search query in the JSON request body, which eliminates URL encoding complexity entirely:
POST /api/v2/knowledge/search
Content-Type: application/json
{
"query": "C++ programming",
"limit": 10,
"filters": {
"category": "technical"
}
}
This approach handles all special characters naturally without encoding requirements. The API processes the JSON body directly, so characters like +, &, <, > work exactly as intended.
For your existing GET implementation, ensure you’re using your programming language’s built-in URL encoding functions rather than manual string replacement. Most languages have libraries that handle this:
JavaScript: encodeURIComponent(query)
Python: urllib.parse.quote(query)
Java: URLEncoder.encode(query, “UTF-8”)
One critical issue specific to the AEC 2022 Knowledge Base API: if you’re using GET requests, the search endpoint has a character limit of 200 characters for the encoded query parameter. Complex queries with many special characters can exceed this after encoding. This is another reason to prefer POST requests, which have no such limitation.
Regarding the search endpoint configuration, verify your API client is sending the correct Content-Type header. The Knowledge Base API expects ‘application/json’ for POST requests and will return empty results if the header is missing or incorrect.
Finally, for handling comparison operators like “price > $100”, you have two options:
- Use POST with the query in JSON body (recommended)
- If using GET, encode the entire phrase: “price%20%3E%20%24100”
The dollar sign ($) should be encoded as %24, and the greater-than symbol as %3E.
After implementing proper encoding or switching to POST, test with your problematic queries. The “C++ programming” search should now return the same 15 articles you see in the UI. If you still get empty results after fixing encoding, check that your API authentication token has the correct permissions for knowledge base search operations.
This draft is based on general Adobe Experience Cloud knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.