Modrinth API Types - v1.1.0
    Preparing search index...

    Type Alias APIProjectSearchParameters

    type APIProjectSearchParameters = {
        facets?: string;
        index?: ProjectSearchParametersIndex;
        limit?: NumberRange<1, 101>;
        offset?: number;
        query?: string;
    }
    Index

    Properties

    facets?: string

    Facets are an essential concept for understanding how to filter our results.

    In order to use facets, you need a value to filter by, as well as an operation to perform on this value. Join together a type, operation and value and you have your string.

    Examples:

    • categories = adventure
    • versions != 1.20.1

    You then join these strings together in arrays to signal AND and OR operators.


    OR:

    All elements in a single array are considered to be joined by OR statements. For example:

    [["versions=1.16.5","versions=1.17.1"]] translates to Projects that support 1.16.5 OR 1.17.1.

    AND:

    Separate arrays are considered to be joined by AND statements. For example:

    [["versions=1.16.5"],["project_type=modpack"]] translates to Projects that support 1.16.5 AND are modpacks.

    The sorting method used for sorting search results.

    The default is relevance.

    limit?: NumberRange<1, 101>

    The number of results returned by the search.

    The default is 10.

    offset?: number

    The offset into the search. Skips this number of results.

    query?: string

    The query to search for.