Medical Articles Live

FREEMIUM
By Ayronada Smith | Updated לפני חודש | Medical
Popularity

8.7 / 10

Latency

194,375ms

Service Level

57%

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.

Followers: 2
Resources:
Product Website
API Creator:
Rapid account: Ayronada Smith
Ayronada Smith
ayronadas
Log In to Rate API
Rating: 5 - Votes: 1