🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
Framework integration / Django

We recommend using our InstantSearch.js library to build your search interface and perform search queries directly from the end-user browser without going through your server.

However, if you want to search from your backend you can use the raw_search(YourModel, 'yourQuery', params) method. It retrieves the raw JSON answer from the API, and accepts in param any search parameters.

1
2
3
4
from algoliasearch_django import raw_search

params = { "hitsPerPage": 5 }
response = raw_search(Contact, "jim", params)
Did you find this page helpful?