Medical Articles Live

부분 유료
분류별 Ayronada Smith | 업데이트됨 एक महीने पहले | Medical
인기

8.6 / 10

지연 시간

203,274ms

서비스 수준

55%

Health Check

N/A

README

Medical Articles API

The Medical Articles API is a Node.js application built with Express.js for scraping and serving medical journal articles. It allows users to retrieve articles related to various medical conditions from the NIH National Library of Medicine’s PubMed database.

Table of Contents

Getting Started

Prerequisites

Before running the API, make sure you have the following software installed:

  • Node.js: You can download it here.

Installation

  1. Clone this repository to your local machine:

    git clone <repository-url>
    
    
  2. Navigate to the project directory:

    cd medical-articles-api
    
    
  3. Install the project dependencies:

    npm install
    
    
  4. Start the server:

    npm start
    
    

Usage

Endpoints

  1. Welcome Message

    • URL: ‘/’
    • Method: ‘GET’
    • Description: Get a welcome message.
  2. Get Medical Articles

    • URL: ‘/journals’
    • Method: ‘GET’
    • Description: Retrieve medical articles from various journals. Articles are cached for improved performance.
  3. Get Specific Article By Disease

    • URL: ‘/journals/:journalId’
    • Method: ‘GET’
    • Description: Retrieve articles from journal based on the disease (journalId = disease). The searchable diseases includes: hiv, allergies, asthma, depression, pneumonia, psoriasis, suicide, hypertension, hidradenitis, diabetes, rheumatoidarthritis, migraine, pregnancy, breastcancer, stroke, pancreatitis, and tuberculosis. Diseases are case-sensitive and does not contain spaces.

Example Requests

Welcome Message

  • Request:
          curl http://localhost:3005
    
  • Response:
          "Welcome to my Medical Articles API"
    
    

Get Medical Articles

  • Request:
          curl http://localhost:3005/journals
    
  • Response:
    {
      "title": "Sample Article Title",
      "url": "https://example.com/article/123",
      "source": "NIH National Library of Medicine",
      "keyword": "hidradenitis"
    },
    // More entries...
    
    
    

Get Articles By Specific Disease

  • Request:
          curl http://localhost:3005/journals/hidradenitis
    
  • Response:
    {
      "title": "Sample Article Title",
      "url": "https://example.com/article/123",
      "source": "NIH National Library of Medicine",
      "keyword": "hidradenitis"
    },
    // More entries...
    
    

Caching

To improve performance, the API caches retrieved articles for a specified duration (default is 10 minutes). Cached data is stored in memory and served to subsequent requests until it expires.

팔로워: 2
자원:
제품 웹사이트
API 생성자 :
Rapid account: Ayronada Smith
Ayronada Smith
ayronadas
Rate API에 로그인
등급: 5 - 투표: 1