Yuewen Open Platform

website·Indexed 35 days ago

https://open.yuewen.com/docsv2/

Technical documentation for Yuewen Group's content APIs, providing partners with solutions for integrating literature, manga, audio, and comic-drama content. Includes API endpoints for retrieving book and chapter data, managing paid/free content rules, user authentication, and data callback mechanisms for consumption orders.

Tokens
36.1K
Snippets
122
Records
179
Agent score
59%

What's inside Yuewen

  1. Choose between Local Storage and Online Literary API integration models

    Yuewen Group provides two primary integration solutions for accessing literary content via API:

    1. Local Storage Literary API (落地文学API): Designed for partners who need to store data locally. The partner server requests data from Yuewen's server and saves it in their own local system for subsequent content management and retrieval.
    2. Online Literary API (在线文学API): A hybrid approach where non-content metadata (such as book titles, author names, and introductions) is requested and stored locally, but specific chapter content is requested in real-time. This ensures that users always receive the most current and accurate content information.
  2. Choose between Local and Online Literary API integration models

    Yuewen Group provides two primary integration schemes for accessing literary content via API:

    1. Local Literary API (落地文学API): Designed for partners who need to store data locally. The partner server requests data from Yuewen's server and saves it in their own local system for subsequent content management and retrieval.
    2. Online Literary API (在线文学API): A hybrid approach where non-content metadata (such as book titles, author names, and introductions) is stored locally by the partner, but actual chapter content is requested in real-time from Yuewen's servers to ensure users always receive the most current and accurate version of the text.
  3. Retrieve smart tag details by tag ID

    Use the tagDetailInfoByTagId endpoint to retrieve detailed information about a specific smart tag, including its short name, full name, description, gender classification, and category (e.g., genre, character, style, or plot).
    # Request Method: GET
    # Endpoint: https://cpapi-i.yuewen.com/book/tagDetailInfoByTagId
    
    # Example Request:
    https://cpapi-i.yuewen.com/book/tagDetailInfoByTagId?appflag=test&timestamp=1700000000&tagId=51000030&sign=XXXXX
  4. Yuewen Book API functional overview

    The following APIs are available for book data management and reporting:

    Data Retrieval:

    • Full Book ID List: Recommended fetch once per day.
    • Book Basic Info: Retrieves summaries, names, and payment status (paid/free).
    • TOC/Chapters: APIs for fetching volume lists, chapter lists per volume, or all chapters for a book.
    • Chapter Content: Retrieves the text of a specific chapter (differs based on 'Offline' vs 'Online' cooperation).
    • Updates/Removals: APIs to fetch books that were taken offline or updated/added within a specific timeframe (recommended fetch every 10 minutes).
    • EPUB Downloads: Retrieves download URLs for EPUB files (differs based on 'Offline' vs 'Online' cooperation).
    • Metadata: APIs for category lists and intelligent tags.

    Data Reporting (Callbacks):

    • Consumption Orders: Report user spending data.
    • Recharge Orders: Report user top-up data.
    • Reading Duration: Report how long users spent reading.
  5. Choose between Localized and Online Literary API integration models

    Yuewen Group provides two distinct architectural patterns for accessing literary content via their API:

    1. Localized Literary API (落地文学API): Designed for partners who need to store full content locally. The partner server requests data from Yuewen and stores it in their own local system for subsequent management and retrieval.
    2. Online Literary API (在线文学API): A hybrid approach where non-content metadata (e.g., book titles, author names, summaries) is stored locally, but actual chapter content is fetched in real-time via API requests to ensure the user always receives the most current and accurate version of the text.
  6. Yuewen Open Platform API functional overview

    The platform provides the following key APIs for book and content management:

    • Book Discovery: Get Full Book ID List (suggested daily), Get Book Basic Information, Get All Chapter Lists, Get Category Information List, Get Intelligent Tag Interface.
    • Content Delivery: Get Chapter Content (available in Free and Paid modes), Get epub File Download Address.
    • Paid Features: Purchase Book or Chapter, Batch Get Chapter List (for purchase status and discounts).
    • Maintenance: Get Books Unlisted within a specific time (suggested every 10 mins), Get Books Updated/Listed within a specific time (suggested every 10 mins).
  7. Retrieve basic book information

    Use this API to retrieve detailed information about a specific book using its book ID (CBID).
    GET https://api.yuewen.com/content/cp/ServiceBus.do?service=CpNovel&action=bookinfo

    Request Parameters:

    • CBID (long, Required): The unique ID of the book.
  8. Choose between Local Storage and Online Real-time Literature API models

    Yuewen Group provides two distinct integration solutions for accessing literary content based on how data is stored and retrieved:

    1. Local Storage Literature API (落地文学API): Designed for partners who need to store the retrieved data directly in their own local systems for independent content management and subsequent calls.
    2. Online Literature API (在线文学API): A hybrid approach where non-content metadata (such as book titles, author names, and introductions) is stored locally, but the actual chapter content is requested in real-time from Yuewen's servers to ensure the most accurate and up-to-date information is delivered to the end user.
  9. Yuewen Open Platform API functional overview

    The platform provides the following primary APIs for book management and data reporting:

    Content Acquisition:

    • Full Book ID List: Recommended daily sync to get all book IDs.
    • Book Basic Info: Get summaries, names, and payment status (free/paid).
    • Directory/Chapters: Get volume lists, chapter lists per volume, or all chapters for a book.
    • Chapter Content: Retrieve the actual text of a specific chapter.
    • EPUB Download: Get time-limited download URLs for EPUB files.
    • Categories & Tags: Retrieve category lists and smart tags.

    Maintenance & Updates:

    • Off-shelf Books: Recommended sync every 10 minutes to identify books removed within a time range.
    • Updated/On-shelf Books: Recommended sync every 10 minutes to identify new or updated books.

    Data Reporting (Callbacks):

    • Consumption Orders: Report user spending data.
    • Recharge Orders: Report user top-up data.
    • Reading Duration: Report user reading time data.
  10. Retrieve basic book information

    Fetch detailed metadata for a specific book using its book ID (CBID). The response includes author name, category, cover URL, introduction, status, and pricing information.
    GET https://api.yuewen.com/content/cp/ServiceBus.do?service=CpNovel&action=bookinfo&CBID=22037867000124502&appKey=xxxxxxxxxx&appToken=xxxxxxxxx
  11. Generate a request signature for Yuewen APIs

    To ensure security, all requests must be signed. The signature is generated using the appsecret and the request parameters (excluding the sign parameter itself) following these steps:

    1. Sort Parameters: Collect all request parameters (common and business). Sort the parameter keys in ascending order based on ASCII values.
    2. Concatenate: Create a string S1 by concatenating the sorted keys and values in the format: key1value1key2value2...keyNvalueN. Do not perform any encoding or add extra characters.
    3. Prepend Secret: Prepend the appsecret to the beginning of string S1 to create string S2.
    4. Hash: Calculate the MD5 hash of S2 and convert the resulting hash to uppercase. This final string is the sign value.
  12. Call Yuewen Open Platform APIs

    Yuewen Open Platform APIs support GET and POST request methods. All requests and responses use UTF-8 character encoding. The Content-Type header must be set to application/x-www-form-urlencoded.

    Available Endpoints:

    • Primary: https://cpapi-i.yuewen.com (Recommended: supports dynamic CDN for better performance).
    • Backup: https://cpapi-n.yuewen.com (Use if the primary endpoint is unavailable).
    Content-Type: application/x-www-form-urlencoded