List of REST API Endpoints in Init Live Search

The Init Live Search plugin provides a powerful and flexible REST API system designed to support both frontend search UI and headless applications. All endpoints use the namespace /wp-json/initlise/v1/ and are optimized with wp_cache_set() to take advantage of server-side or CDN caching (e.g. Cloudflare).

List of REST API Endpoints in Init Live Search

1. /search

  • Method: GET
  • Params: term (keyword), exclude (optional)
  • Description: Main search query that returns posts based on title or content. Enhanced filters follow plugin settings.

2. /id/{id}

  • Method: GET
  • Params: A valid post ID
  • Description: Returns the permalink of the post if it’s published. No redirect applied.

3. /recent

  • Method: GET
  • Params: page (optional)
  • Description: Fetch the latest posts, limited by plugin settings. Cached for 5 minutes.

4. /date?value=YYYY, YYYY/MM, YYYY/MM/DD

  • Method: GET
  • Params: value in a flexible date format
  • Description: Filter posts by year, month, or day. Also works with /date slash command.

5. /tax?taxonomy=category&term=slug

  • Method: GET
  • Params: taxonomy, term (slug, ID, or multiple values separated by space or comma)
  • Description: Filter posts by taxonomy (e.g., categories, tags, or custom). Uses AND logic for multiple terms.

6. /related?title=post-title&exclude=ID

  • Method: GET
  • Params: title (required), exclude (optional)
  • Description: Analyze title to fetch related posts. Caching applied if exclude is not used.

7. /read?ids=1,2,3

  • Method: GET
  • Params: ids as a comma-separated list
  • Description: Return post data based on a list of IDs (e.g., saved in localStorage or used with Init Reading Position plugin).

8. /random

  • Method: GET
  • Params: None
  • Description: Return a permalink to a random post from supported post types.

9. /taxonomies?taxonomy=category

  • Method: GET
  • Params: taxonomy (supports category and post_tag)
  • Description: Return a sorted list of taxonomy terms by post count. Supports TTL caching.

10. /product

  • Method: GET
  • Supported Params:
    • term: Product name keyword
    • sku: Product SKU (partial match allowed)
    • on_sale=1: Filter sale items only
    • in_stock=1: Filter in-stock items only
    • min_price / max_price: Price range
    • price_order: sort (asc) or rsort (desc)
    • brand, attribute, variation, value: Taxonomy filters
    • page: Pagination (default: 1)
  • Slash Commands: /product, /on-sale, /stock, /sku, /price
  • Returned Data:
    • Title, URL, current price
    • Sale status and stock availability
    • Thumbnail image
    • Main category (if available)
    • add_to_cart_url for quick cart action
  • Caching: Each query is cached for 5 minutes

Example:

/product?page=1&on_sale=1&in_stock=1&sku=ABC&min_price=100&max_price=500

11. /coupon

  • Method: GET
  • Params: None
  • Description: Return active WooCommerce coupons (not expired and within usage limit).
  • Returned Data:
    • Coupon code
    • Description (if available)
    • Remaining usage count
    • Expiration date

Summary

The Init Live Search REST API system is fully optimized for modern web architecture. All endpoints are cache-aware, easily debuggable, scalable, and tailored for developers building custom frontends, WordPress plugins, or headless applications. Whether you need search, filtering, WooCommerce integration, or reading history – this API provides a reliable and extensible foundation.

Comments


  • No comments yet.

Web-Based Tools

Press Ctrl + \ on desktop, or swipe left anywhere on mobile.

Login