Discourse Search API

The Search API from Discourse — 1 operation(s) for search.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/discourse:discourse-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

discourse-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Discourse API Documentation Search API
  x-logo:
    url: https://docs.discourse.org/logo.svg
  version: latest
  description: This page contains the documentation on how to use Discourse through API calls.
  license:
    name: MIT
    url: https://docs.discourse.org/LICENSE.txt
servers:
- url: https://{defaultHost}
  variables:
    defaultHost:
      default: discourse.example.com
tags:
- name: Search
paths:
  /search.json:
    get:
      summary: Search for a term
      tags:
      - Search
      operationId: search
      parameters:
      - name: q
        in: query
        example: 'api @blake #support tags:api after:2021-06-04 in:unseen in:open

          order:latest_topic'
        description: 'The 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,solved` or for posts that have all the specified tags `api+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_id

          - `group_messages:`: group_name or group_id

          - `min_posts:`: 1

          - `max_posts:`: 10

          - `min_views:`: 1

          - `max_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:4200/search.json" \

          --data-urlencode ''q=wordpress @scossar #fun after:2020-01-01''

          ```

          '
        schema:
          type: string
      - name: page
        in: query
        example: 1
        schema:
          type: integer
      responses:
        '200':
          description: success response
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  posts:
                    type: array
                    items: {}
                  users:
                    type: array
                    items: {}
                  categories:
                    type: array
                    items: {}
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        slug:
                          type: string
                      required:
                      - id
                      - name
                      - slug
                  groups:
                    type: array
                    items: {}
                  grouped_search_result:
                    type: object
                    additionalProperties: false
                    properties:
                      more_posts:
                        type:
                        - string
                        - 'null'
                      more_users:
                        type:
                        - string
                        - 'null'
                      more_categories:
                        type:
                        - string
                        - 'null'
                      term:
                        type: string
                      search_log_id:
                        type: integer
                      more_full_page_results:
                        type:
                        - string
                        - 'null'
                      can_create_topic:
                        type: boolean
                      error:
                        type:
                        - string
                        - 'null'
                      extra:
                        type: object
                        properties:
                          categories:
                            type:
                            - array
                            - 'null'
                      post_ids:
                        type: array
                        items: {}
                      user_ids:
                        type: array
                        items: {}
                      category_ids:
                        type: array
                        items: {}
                      tag_ids:
                        type: array
                        items: {}
                      group_ids:
                        type: array
                        items: {}
                    required:
                    - more_posts
                    - more_users
                    - more_categories
                    - term
                    - search_log_id
                    - more_full_page_results
                    - can_create_topic
                    - error
                    - post_ids
                    - user_ids
                    - category_ids
                    - tag_ids
                    - group_ids
                required:
                - posts
                - users
                - categories
                - tags
                - groups
                - grouped_search_result
x-provenance:
  method: harvested
  publisher: Discourse
  source: https://docs.discourse.org/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)