b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Advanced Topics
  3. Using the APIs
  4. REST API or RESTful API
  5. Search (REST)

Search (REST)

GET <baseurl>/api/v1/collections/<collname>/search/<keywords url encoded>

This is the API equivalent of disp = search.

Parameters

Possible request params

Name

Type

Description

Default

page

integer

Page number

1

per_page

integer

Count results per page

10

kind

string

Where we should search the results.
Possible values: all, item, comment, category, tag.
Use ,(comma) as separator to include several kinds, for example: item,comment or tag,comment,category.

all

exclude_posts

string

IDs of posts/items which should be excluded from results. Use ,(comma) for separator.

Response

Response is an array of the following properties:

Name

Type

Description

found

integer

Number of found items/posts

page

integer

Current page

page_size

integer

Number items/posts per page

pages_total

integer

Number of total pages

results

array

Array of results list, see the properties in the table below

Name

Type

Description

kind

string

item / comment / category / tag

id

integer

ID of searched result

title

string

Search result title

desc

string

Search result description

permalink

string

Url to view the searched result

Errors

Possible Error Codes

Error code

HTTP response

Message

access_requires_login

403

You need to log in before you can access this section.

access_denied

403

You are not a member of this section, therefore you are not allowed to access it.

wrong_route

404

Collection name is not defined

unknown_collection

404

No collection found in DB by requested url name

wrong_route

404

Collection controller is not defined

no_search_results

200

Sorry, we could not find anything matching your request, please try to broaden your search.

Used for:

  • Search items in modal window to merge posts
  • Search items in modal window to insert short link by Short Links / ForeverLinks / Quick Links Plugin
Created by yurabakhtin • Last edit by yurabakhtin on 2019-09-11 14:37 • •

No feedback yet

On this page

  • Parameters
  • Response
  • Errors
  • Used for:

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
    • Using Desktop Blogging Tools
    • Using Blogging Apps
    • Blogging by email
    • Using the APIs
      • REST API or RESTful API
        • List Collections (REST)
        • List Posts (REST)
        • List Items (REST)
        • Retrieve a Post (REST)
        • Retrieve any item (REST)
        • Search (REST)
        • List Users (REST)
        • Retrieve a User (REST)
        • Create a User (REST)
        • Update a User (REST)
        • Delete a User (REST)
        • Cookie Authentication (REST)
        • Basic HTTP Authentication (REST)
      • B2 API
      • API Error Codes
      • Blogger API
      • MetaWeblog API
      • MovableType API
    • Contributing
    • Translations (i18n/l10n)
    • Monetizing
    • How to...
    • Podcasting
  • Glossary
  • Archives
Build your own website!

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque