I think it would be better if we declare this function inside the function `ddg_spice_kwixer`—just to reduce the number of global variables.

```javascript
function ddg_spice_kwixer(api_response) {
    function getQueryParams() {
        ...
    }
    ...
}
```