Hi Edson,
We have no such hook, but you can intercept the requests like ‘GET https://api.searchiq.co/api/search/results….’ to get the response and override the results in ‘XMLHttpRequest.prototype.send’ method.
Hi @searchiq,
thanks for your reply it’s appreciate ;). In my case I hope i can find a way to modify it using php.
I’ve made a short POC :
https://onlinephp.io/c/ae35e
the idea is to use the http_api_debug from WordPress to debug and modifiy the http request. But it seems to not work. To be sure the request is launch with the wsAPICall method from siq-search-api-client.php line 51 ? I’ve put some debug and it seems not.
Thanks for your help 😉
Hi Edson,
For autocomplete, it doesn’t go through the client server. The search result page can be configured to go through the server, but the better and fastest solution is to use our JS solution.
Ha ok, there is a documentation who explain how to do it ?
Please check the below user guide and let us know if you need help with the implementation.
https://www.searchiq.co/regular-user-guide.html
Hi Edson, have you tried implementing the JS solution? Please let us know if you need any help with the setup.
Hi there,
i’ve a solution using xhook to catch the request before send it but for now i’ve another issue. I’ve a 500 error with this page : https://api.searchiq.co/api/search/results?q=hr&engineKey=2f7c4b52c81aad5363e904e5d21108e6&page=0&itemsPerPage=5&group=0&autocomplete=1&documentTypes=post%2Cpage
do you have an idea how I can fix it ?
Regards
We will check and update you.
We tried the API call and able to get the response. Please add Accept
header to the API call.
curl -H “Accept: application/json, text/javascript, */*; q=0.01” “https://api.searchiq.co/api/search/results?q=hr&engineKey=2f7c4b52c81aad5363e904e5d21108e6&page=0&itemsPerPage=5&group=0&autocomplete=1&documentTypes=post%2Cpage“
-
This reply was modified 1 year, 1 month ago by
SearchIQ.
Hi Edson, does the API call worked?
Hi,
sorry for the late response. Yes it seems to work, we’ve a cors error but it’s on our side. We can close the issue, if i need more help I’ll reopen it
thanks again
Regards
Great to know it worked.
Please feel free to contact us if you have any questions.