Search for a term
GET/search.json
Search for a term
Request
Query Parameters
- 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,solved
or for posts that have all the specified tagsapi+solved
.before:
:yyyy-mm-dd
after:
:yyyy-mm-dd
order:
:latest
,likes
,views
,latest_topic
assigned:
: username (without@
)in:
:title
,likes
,personal
,messages
,seen
,unseen
,posted
,created
,watching
,tracking
,bookmarks
,assigned
,unassigned
,first
,pinned
,wiki
with:
:images
status:
:open
,closed
,public
,archived
,noreplies
,single_user
,solved
,unsolved
group:
: group_name or group_idgroup_messages:
: group_name or group_idmin_posts:
: 1max_posts:
: 10min_views:
: 1max_views:
: 10
q string
The query string needs to be url encoded and is made up of the following options:
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:4200/search.json" \
--data-urlencode 'q=wordpress @scossar #fun after:2020-01-01'
Example: api @blake #support tags:api after:2021-06-04 in:unseen in:open order:latest_topic
page integer
Example: 1
Responses
- 200
success response
- application/json
- Schema
- Example (from schema)
Schema
posts undefined[]required
users undefined[]required
categories undefined[]required
tags undefined[]required
groups undefined[]required
grouped_search_result objectrequired
more_posts stringnullrequired
more_users stringnullrequired
more_categories stringnullrequired
term stringrequired
search_log_id integerrequired
more_full_page_results stringnullrequired
can_create_topic booleanrequired
error stringnullrequired
extra object
categories arraynullrequired
post_ids undefined[]required
user_ids undefined[]required
category_ids undefined[]required
tag_ids undefined[]required
group_ids undefined[]required
{
"posts": [
null
],
"users": [
null
],
"categories": [
null
],
"tags": [
null
],
"groups": [
null
],
"grouped_search_result": {
"term": "string",
"search_log_id": 0,
"can_create_topic": true,
"extra": {},
"post_ids": [
null
],
"user_ids": [
null
],
"category_ids": [
null
],
"tag_ids": [
null
],
"group_ids": [
null
]
}
}
Loading...