Search
Search for a term
GET
https://discourse.example.com/search.json
Parameters
qstringqueryThe query string needs to be url encoded and is made up of the following options:
- Search term. This is just a string. Usually it would be the first item in the query.
@<username>: Use the@followed by the username to specify posts by this user.#<category>: Use the#followed by the category slug to search within this category.tags::api,solvedor for posts that have all the specified tagsapi+solved.before::yyyy-mm-ddafter::yyyy-mm-ddorder::latest,likes,views,latest_topicassigned:: username (without@)in::title,likes,personal,messages,seen,unseen,posted,created,watching,tracking,bookmarks,assigned,unassigned,first,pinned,wikiwith::imagesstatus::open,closed,public,archived,noreplies,single_user,solved,unsolvedgroup:: group_name or group_idgroup_messages:: group_name or group_idmin_posts:: 1max_posts:: 10min_views:: 1max_views:: 10
If you are using cURL you can use the -G and the --data-urlencode flags to encode the query:
curl -i -sS -X GET -G "http://localhost:3000/search.json" \
--data-urlencode 'q=wordpress @scossar #fun after:2020-01-01'pageintegerqueryResponse
200OKany
success response