noolingo

文档精选社区下载反馈订阅

Noolingo API

Noolingo provides a complete API interface that allows you to connect any supported external application. All APIs follow REST design principles and use standard HTTP methods and status codes for interaction.

About Noolingo API

Using the Noolingo API, you can:

  • Automate note management: Batch create, modify, and delete notes
  • Integrate with other tools: Connect Noolingo with your workflows, scripts, or other applications
  • Data analysis: Export data for analysis or generate reports
  • Custom features: Build features that meet your needs

All API requests use standard HTTP methods (GET, POST, PUT, DELETE) and return data in JSON format.

Basic Information

Base URL: https://api.noolingo.com/api

Authentication: Bearer Token

Request Headers: Add Authorization: Bearer your_api_key_here to request headers

Response Format: All responses are in JSON format, using standard HTTP status codes (200 success, 400 bad request, 401 unauthorized, 404 not found, etc.)

Getting API Keys

Before using the API, you need to obtain an API key:

  1. Log into your Noolingo account
  2. Go to "Settings > Account Settings > ApiKey"
  3. Click "Create New Key" to generate your API key
  4. If you need to refresh your key (for example, if you suspect it's been compromised), click the "Refresh Key" button

Security Tip: Please keep your API key secure. Don't commit it to code repositories or share it publicly. If your key is compromised, refresh it immediately.

Get Note List

Get your note list with pagination and filtering support.

HTTP Method: GET

Path: /notes/

Query Parameters:

ParameterTypeRequiredDescription
limitIntegerNoNumber of notes returned per page, default 0 (return all), max 100
offsetIntegerNoPagination offset, default 0
deck_idStringNoFilter notes within a specific notebook
tagStringNoFilter notes containing a specific tag

Example Request:

GET /notes/?limit=50&offset=100&deck_id=abc123
Authorization: Bearer your_api_key_here

Response Example:

{
  "data": [
    {
      "id": "note-id-1",
      "title": "Note Title",
      "markdown_text": "Note content",
      "tags": ["Tag1", "Tag2"],
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "total": 100,
  "limit": 50,
  "offset": 100
}

Get Single Note

Get detailed information for a specific note.

HTTP Method: GET

Path: /notes/:note_id

Path Parameter: note_id - Unique identifier of the note

Example Request:

GET /notes/499b224a-e51e-4f9e-928a-cac7a66dbc4d
Authorization: Bearer your_api_key_here

Response Example:

{
  "id": "499b224a-e51e-4f9e-928a-cac7a66dbc4d",
  "title": "Note Title",
  "markdown_text": "Note's Markdown content",
  "tags": ["Tag1", "Tag2"],
  "deck_id": "Notebook ID",
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
}

Create Note

Create a new note.

HTTP Method: POST

Path: /notes/?deck_id=xx

Query Parameter: deck_id (optional) - Specifies the notebook ID the note belongs to. If not provided, the note will be created in the default notebook.

Request Body:

FieldTypeRequiredDescription
titleStringNoNote title
markdown_textStringYesNote content in Markdown format
tagsArrayNoTag array, e.g., ["Tag1", "Tag2"]

Important Note: Noolingo's core storage format is Markdown, so the API only accepts the markdown_text field. Please use Markdown format to submit note content. The old html_text field is no longer supported and may cause notes to be unreadable.

Example Request:

POST /notes/?deck_id=abc123
Authorization: Bearer your_api_key_here
Content-Type: application/json

{
  "title": "New Note",
  "markdown_text": "This is note content\n\n**Key content**",
  "tags": ["Study", "Important"]
}

Response Example:

{
  "id": "newly-created-note-id",
  "title": "New Note",
  "markdown_text": "This is note content\n\n**Key content**",
  "tags": ["Study", "Important"],
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
}

Update Note

Update an existing note.

HTTP Method: PUT

Path: /notes/:note_id

Path Parameter: note_id - ID of the note to update

Request Body:

FieldTypeRequiredDescription
titleStringNoNote title
markdown_textStringNoNote content in Markdown format
tagsArrayNoTag array

Note: All fields are optional. You only need to provide the fields you want to update. Fields not provided will maintain their original values.

Important Note: Please use the markdown_text field to update note content. The html_text field is no longer supported and may cause notes to be unreadable.

Example Request:

PUT /notes/499b224a-e51e-4f9e-928a-cac7a66dbc4d
Authorization: Bearer your_api_key_here
Content-Type: application/json

{
  "title": "Updated Title",
  "tags": ["New Tag"]
}

Error Handling

The API uses standard HTTP status codes to indicate request results:

  • 200 OK: Request successful
  • 400 Bad Request: Request parameter error
  • 401 Unauthorized: Authentication failed, API key invalid
  • 404 Not Found: Requested resource does not exist
  • 500 Internal Server Error: Server internal error

Error responses will include error information:

{
  "error": "Error description",
  "code": "Error code"
}

Usage Recommendations

Rate Limits: To ensure service stability, API requests have rate limits. Please control request frequency reasonably and avoid overly frequent requests.

Data Format: You must use Markdown format to submit content. Noolingo's core storage format is Markdown, and the API only accepts the markdown_text field. Do not use the html_text field - it is no longer supported and may cause notes to be unreadable. If you have HTML content, please convert it to Markdown format before submitting.

Batch Operations: If you need to create or update notes in batches, we recommend processing in batches of no more than 100 items per batch to avoid overly large single requests.

Error Retry: If a request fails, you can check the error message and retry appropriately. For network errors, we recommend implementing an exponential backoff retry strategy.

The Noolingo API provides flexible data access methods, allowing you to customize workflows according to your needs.