API

Search

  • Search for notes
  • Search for notebooks

Search for Notes

Description

Retrieves notes that match a given search query

URL

/api/v1/notes/

HTTP Method

GET

Path Parameters

None

Query Parameters

  • q (String): the search query (required)

Data Parameters

None

Request Headers

  • Content-Type: application/json
  • Authorization: Bearer

Response

  • Status Code: 200
  • Content-Type: application/json
  • Schema/Example::
{
  "data": [
    {
      "item_id": "w078qlgo",
      "title": "Beautiful One bedroom - must see! - apts/housing for rent -...",
      "url": "https://newyork.craigslist.org/brx/apa/d/bronx-beautiful-one-bedroom-must-see/7294892474.html",
      "note": "<p>places in town now</p>",
      "tags": [],
      "created": "2021-07-11T10:09:01.252539Z",
      "modified": "2021-07-11T10:09:01.252584Z"
    },
    {
      "item_id": "a69jntmo",
      "title": "Hacker News",
      "url": "https://news.ycombinator.com/",
      "note": "<p>checking for save status just for now</p>",
      "tags": [],
      "created": "2021-07-11T10:09:01.252539Z",
      "modified": "2021-07-11T10:09:01.252584Z"
    }
  ],
  "error": false,
  "errcode": 0,
  "errmsg": null,
  "status": 200,
  "count": 50,
  "next": "https://histre.com/api/v1/notes/?page=2&q=e",
  "previous": null
}

Note: This endpoint returns a paginated response, please see Pagination section under Overview of this API documentation.

Search for Notebooks

Description

Search for notebooks that belong to a user using a search query

URL

/api/v1/notebooks/search/

HTTP Method

GET

Path Parameters

None

Query Parameters

  • q (String): all or part of the notebook title to search for (required)
  • url (String): if passed, the notebooks in search results will include info if they're associated (linked) to the given URL (optional)
  • channel (String): the source of the search request, can be "extension" or "web" (optional; the default is "web")

Data Parameters

None

Request Headers

  • Content-Type: application/json
  • Authorization: Bearer

Response

  • Status Code: 200
  • Content-Type: application/json
  • Schema/Example: the below example is the response when the source channel is "web"
{
  "data": {
    "search_results": [
      {
        "book_id": "i129h6zu",
        "title": "First Private Notebook of user1",
        "slug": "first-private-notebook-of-user1",
        "public": false,
        "created": "2021-07-11T10:09:01.252539Z",
        "modified": "2021-07-11T10:09:01.252584Z"
      },
      {
        "book_id": "i1zpxqtz",
        "title": "First Public Notebook of user1",
        "slug": "first-public-notebook-of-user1",
        "public": true,
        "created": "2021-07-11T10:09:01.252539Z",
        "modified": "2021-07-11T10:09:01.252584Z"
      }
    ]
  },
  "error": false,
  "errcode": 0,
  "errmsg": null,
  "status": 200
}