Skip to main content

Request Parameters

Below are the available parameters for querying the Mojeek Search API.

View response formats: XML | JSON

The endpoints listed below should be appended to https://www.mojeek.com

Retrieve search results

/search

  • api_key string
    Your unique api key to retrieve results.
  • q string
    URL encoded string containing the search query.
  • qm string
    URL encoded string containing excluded words, i.e. discard documents that contain them.
  • s integer
    Start results from this number i.e. 1 = first result, 11 = first result of second page (if displaying 10 results per page).
  • t integer
    Maximum number of results to return, i.e. results per page.
    Default = 10.
  • site string
    String containing site to limit search to, e.g. mojeek.com.
    Note: when performing an OrgSearch this will restrict the results to the provided domain, otherwise all sites within your organisation will be searched. This parameter can be provided as a URL parameter or directly in the search query as a search operator.
  • since string
    String containing timespan to limit results to. Valid formats: 'day'|'month'|'year'|YYYYMMDD
    Note: this parameter can be provided as a URL parameter or directly in the search query as a search operator.
  • before string
    String containing timespan to limit results to. Results will be restricted by dates up to, but not including, this value.
    Valid formats: 'day'|'month'|'year'|YYYYMMDD
  • rb string
    rbb integer
    Prefer pages with this region to appear higher in the results. rbb can be set between 1-100 to adjust the amount of boost given to pages in the specified region. Recommended value rbb=10.
    Valid options for 'rb': Country code in ISO 3166-1 alpha-2 format, e.g 'GB' or 'FR'.
  • reg enum
    Restrict search to pages from the UK, Germany, France or the EU only. Usage of this parameter is not recommended in general. Use rb, rbb instead.
    Valid options: Country code in ISO 3166-1 alpha-2 format, e.g 'GB' or 'FR'.
  • lb string
    lbb integer
    Prefer pages with this language to appear higher in the results. lbb can be set between 1-100 to adjust the amount of boost given to pages in the specified language. Recommended value lbb=100.
    Valid options for 'lb': Language code in ISO 639-1 format, e.g. 'EN' or 'FR'.
  • lr string Beta
    Restrict search to pages with specific language.
    Valid options: Language code in ISO 639-1 format, e.g. 'EN' or 'FR'.
  • si integer
    Maximum number of results to return per site, per complete query result set.
  • date boolean
    Include the last modified date as recognised by Mojeek.
    Valid options: [0|1]. Default = 0.
  • cdate boolean
    Include the date that the page was last crawled on.
    Valid options: [0|1]. Default = 0.
  • size boolean
    Include the document's size.
    Valid options: [0|1]. Default = 0.
  • fmt enum
    Retrieve the response in JSON format.
    Valid options: [json|xml]. Default = xml.
  • datewr integer
    Date weight ratio. Set to 100 to rank results by date.
    Valid options: [0|100]. Default = 0.
    Note: this option will rank results by the last modified 'date' or the 'pubdate' for OrgSearch users if it's been set.
  • tlen integer
    Set result title length.
    Valid options: [0|127]. Default = 56.
  • dlen integer
    Set snippet length.
    Valid options: [0|511]. Default = 160.
  • safe boolean
    Turning on Safe Search helps remove adult rated content, like pornography.
    Valid options: [0|1]. Default = 0.
  • fi string
    Comma separated domain names will be included in Mojeek search results.
    Note: to include all subdomains for a host, prepend a dot to the domain, e.g. '.mojeek.com'. Max of 25 domains. When enabled, parameter
    si
    defaults to 0.
  • fe string
    Comma separated domain names will be excluded in Mojeek search results.
    Note: to exclude all subdomains for a host, prepend a dot to the domain, e.g. '.mojeek.com'. Max of 25 domains. When enabled, parameter
    si
    defaults to 0.
  • categories string OrgSearch-only
    Show results that match all of the case-sensitive pipe-separated categories. e.g. cat1|cat2
    Note: this option is only available when performing an OrgSearch.
  • num_ref_cats integer OrgSearch-only
    The maximum number of popular categories to return from within the current set of results. Used to refine further the currently selected categories.
    Valid options: 0 - 20. Default = 0.
    Note: this option is only available when performing an OrgSearch.
  • num_other_cats integer OrgSearch-only
    The maximum number of suggested categories to return from all documents that matched the query. Used to suggest a new set of categories.
    Valid options: 0 - 20. Default = 0.
    Note: this option is only available when performing an OrgSearch.
  • facet_date_gap string OrgSearch-only
    Define the range to group the date facets by.
    Valid options: 'day'|'month'|'year'.
    Note: this option is required for all date faceted requests.
  • facet_date_limit integer OrgSearch-only
    Retrieve the most recent n date facets, grouped by facet_date_gap.
    Default = 0.
    Note: this parameter requires the 'facet_date_gap' parameter to also be sent.

Further reading: XML Response Format, JSON Response Format