Search

Since there's only one endpoint for searches, this page differs from the other documentation pages in structure.

We use a minimal fuzzy search engine to return search results from requests to the /search?q=${search_query} endpoint. There's currently no rate limit on this API endpoint, but there might be in the future, so always check Rate Limits page.

Request Example

Method: GET

Header
{
    "Content-Type": "application/json"
}

There's no body to this request.

Return Example

200 OK
{
    "posts": [ // An array of posts
        {
            // Post data
        }
    ],
    "users": [ // An array of users
        {
            // User data
        }
    ],
    "communities": [ // An array of communities
        {
            // Community data
        }
    ]
}

This error occurs when the request doesn't contain a search query.


This error occurs when the API fails to query the posts from the database.


This error occurs when the API fails to query the users from the database.


This error occurs when the API fails to query the communities from the database.

Formatting

The correct formatting for search queries is: /search?q=this+is+spicy , where whitespace characters get replaced with + characters.

Last updated