GeDiPNet REST API

Programmatic access to gene-disease-pathway associations. Query genes, diseases, and biological pathways through a REST API.

1. Introduction

The GeDiPNet REST API provides programmatic access to curated gene-disease-pathway associations, regulatory networks, and biological annotations. Use it to:

2. Base URL

https://gedipnet.bicnirrh.res.in/api

All endpoints are relative to this base URL. For example:

https://gedipnet.bicnirrh.res.in/api/genes/BRCA1

3. Authentication

API Key Required: All endpoints (except the /test health check) require a valid API key. Keys are free and issued instantly upon registration.
Log in to Get Your Free API Key

How to send your key

MethodHow to sendRecommended?
Request header X-API-Key: your-key-here Yes — preferred
Query parameter ?api_key=your-key-here Fallback only
Interactive console below Click Authorize (top right of the console) and paste your key Yes — for browser testing

Getting your key in 3 steps

Step 1 — Register / Log in

Visit login.php and create a free account or log in with your existing credentials.

Step 2 — Generate Key

On your profile dashboard, click "Generate My API Key". Your unique key is created instantly.

Step 3 — Check Your Email

Your key is sent to your registered email address immediately.

4. Request Format

All API requests follow standard REST principles:

Example GET Request:

curl -X GET "https://gedipnet.bicnirrh.res.in/api/genes/BRCA1" \ -H "X-API-Key: your-key-here" \ -H "accept: application/json"

Example POST Request:

curl -X POST "https://gedipnet.bicnirrh.res.in/api/diseases/bulk" \ -H "X-API-Key: your-key-here" \ -H "Content-Type: application/json" \ -d '{"diseases": ["breast cancer", "diabetes mellitus"]}'

Example in Python:

import requests headers = {"X-API-Key": "your-key-here"} r = requests.get("https://gedipnet.bicnirrh.res.in/api/genes/BRCA1", headers=headers) print(r.json())

Example in R:

library(httr) library(jsonlite) res <- GET("https://gedipnet.bicnirrh.res.in/api/genes/BRCA1", add_headers("X-API-Key" = "your-key-here")) data <- fromJSON(content(res, "text"))

5. Response Format

All successful responses return JSON with a consistent envelope:

{ "status": "success", "data": { ... }, "count": 123, "pagination": { "page": 1, "has_next": true, ... } }

Top-level fields

Disease response fields

6. Error Handling

Errors return the appropriate HTTP status code and a JSON body:

HTTP CodeMeaningExample Scenario
400Bad RequestInvalid parameter format or missing required field
401UnauthorizedNo API key was sent with the request
403ForbiddenAPI key is invalid or has been revoked
404Not FoundRequested gene, disease, or pathway does not exist
422Unprocessable EntityValid format but semantic error (e.g. unknown gene symbol)
429Too Many RequestsRate limit exceeded — 100 requests/hour per key
500Internal Server ErrorUnexpected server or database failure
503Service UnavailableTemporary maintenance or database connection issue
{ "status": "error", "message": "Gene 'XYZ123' not found in database", "code": 404 }

7. Rate Limits

Limit: Each API key is restricted to 100 requests per hour. Exceeding this returns HTTP 429 with a retry_after_seconds field.

Rate limit headers

Every response includes these headers:

HeaderMeaning
X-RateLimit-LimitYour ceiling — always 100
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetUnix timestamp when your counter resets

Best practices:

8. How to Use the Interactive Console

The console below is powered by Swagger UI — test any endpoint directly from your browser without writing code.

Before you start: You need an API key. Log in to your profile to generate one instantly. Then click the Authorize button at the top right of the console, paste your key, and click Authorize.

1 Authorize

Click "Authorize" at the top right, paste your X-API-Key, and confirm. Only needed once per session.

2 Select Endpoint

Click any endpoint row to expand its parameters, schema, and example response.

3 Try It Out

Click "Try it out" to enable the input fields.

4 Fill Parameters

Enter required values (marked *). Example values are pre-filled to help you get started.

5 Execute

Click "Execute" to fire the request. You'll see the full URL, a ready-to-copy cURL command, status code, and JSON response.

Tip: Copy the generated cURL command and adapt it for Python (requests), R (httr), or any other language to integrate GeDiPNet data into your pipeline.