This repository contains scripts to test the behavior of an autocomplete API, including case sensitivity, rate limits, and query constraints.
If you haven't installed the required dependencies, run:
npm installExecute the script using
node <filename>.js(Replace with the actual script name, e.g., totalwordCount.js.)
We tested the API using a set of encoded and special character queries to evaluate response behavior.
- Alphabet:
a-z - Numbers:
0-9 - Uppercase:
A-Z - Special Characters:
+ - . _ ~ *
%20(Space)%2B(+)%2D(-)%2E(.)%5F(_)%7E(~)
These queries help determine whether the API correctly handles special characters and encoded inputs.
- V1: Case-sensitive (treats 'a' and 'A' as different inputs)
- V2: Case-sensitive (same behavior)
- V3: Case-sensitive (same behavior)
✅ All versions differentiate between uppercase and lowercase queries.
| API Version | Max Requests | Reset Time |
|---|---|---|
| V1 | 100 | 1 min |
| V2 | 50 | 1 min |
| V3 | 80 | 1 min |
Each version enforces a different request limit before blocking further queries.
✔ Accepts lowercase letters
❌ Rejects uppercase, mixed case, numbers, alphanumeric, and special characters
✔ Returns results for empty and whitespace queries
✔ Accepts lowercase letters
❌ Rejects uppercase, mixed case, numbers, alphanumeric, and special characters
✔ Returns results for empty and whitespace queries
✔ Accepts lowercase letters
❌ Rejects uppercase, mixed case, numbers, alphanumeric, and special characters
✔ Returns results for empty and whitespace queries
| API Version | Requests Made | Results Found |
|---|---|---|
| V1 | 334 | 260 |
| V2 | 566 | 492 |
| V3 | 623 | 570 |