Socrates AI LIVE
Research API
Try API Contact

API Documentation

Complete reference for the Socrates AI Research API. Search millions of academic papers and integrate research intelligence into your applications.

API Status: Operational

Overview

The Socrates AI Research API provides programmatic access to academic research and paper search capabilities. Search millions of research papers, extract insights, and integrate research intelligence into your applications.

Base URL: https://socrates-ai-nanda.onrender.com

Current Version: v1.0

Authentication

No authentication required. The API is publicly accessible with rate limiting applied per IP address.

Rate Limits

Free tier with rate limiting per IP. Rate limit headers included in all responses:

  • X-RateLimit-Remaining: Requests remaining in current window
  • X-RateLimit-Reset: Time when rate limit resets (Unix timestamp)

Endpoints

POST /research

Search academic papers and research literature using natural language queries.

Request:

POST /research
Content-Type: application/json

{
  "query": "machine learning applications",
  "limit": 10,
  "sort": "relevance",
  "format": "structured"
}

Parameters:

Parameter Type Required Description
query string Yes Search query in natural language
limit integer No Number of results (default: 10, max: 50)
sort string No Sort order: relevance (default) or date
format string No Response format: structured (default) or raw

Response:

{
  "results": [
    {
      "title": "Deep Learning for Medical Image Analysis",
      "authors": ["Smith, J.", "Johnson, A.", "Williams, B."],
      "abstract": "This paper presents a comprehensive survey...",
      "url": "https://arxiv.org/abs/2401.12345",
      "published": "2024-01-15",
      "venue": "Nature Medicine",
      "citations": 245,
      "relevance_score": 0.94,
      "keywords": ["deep learning", "medical imaging"]
    }
  ],
  "total": 1247,
  "query": "machine learning applications",
  "processing_time": "0.42s"
}

GET /health

Check API operational status and system health.

GET /health

{
  "status": "operational",
  "uptime": "99.7%",
  "response_time": "0.12s",
  "last_updated": "2025-06-16T14:30:00Z",
  "version": "1.0.0"
}

POST /search

Alternative endpoint for simple text-based search.

POST /search
Content-Type: application/json

{
  "q": "quantum computing",
  "count": 5
}

Error Handling

All error responses follow a consistent format:

{
  "error": {
    "code": "INVALID_QUERY",
    "message": "The search query cannot be empty",
    "details": "Please provide a valid search query"
  },
  "timestamp": "2025-06-16T14:30:00Z",
  "path": "/research"
}

Common Error Codes:

Code HTTP Status Description
INVALID_QUERY 400 Empty or malformed search query
RATE_LIMITED 429 Too many requests from IP
INTERNAL_ERROR 500 Server-side processing error

Code Examples

Python

import requests

response = requests.post(
    "https://socrates-ai-nanda.onrender.com/research",
    json={
        "query": "machine learning healthcare applications",
        "limit": 5,
        "sort": "relevance"
    }
)

if response.status_code == 200:
    data = response.json()
    for paper in data["results"]:
        print(f"Title: {paper['title']}")
        print(f"Authors: {', '.join(paper['authors'])}")
        print(f"URL: {paper['url']}\n")
else:
    print(f"Error: {response.json()}")

JavaScript

async function searchPapers(query) {
  try {
    const response = await fetch('https://socrates-ai-nanda.onrender.com/research', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        query: query,
        limit: 10,
        format: 'structured'
      })
    });

    const data = await response.json();
    return data.results;
  } catch (error) {
    console.error('Search failed:', error);
    return [];
  }
}

// Usage
searchPapers('artificial intelligence ethics').then(papers => {
  papers.forEach(paper => {
    console.log(`${paper.title} - ${paper.published}`);
  });
});

cURL

# Basic research search
curl -X POST https://socrates-ai-nanda.onrender.com/research \
  -H "Content-Type: application/json" \
  -d '{
    "query": "climate change mitigation strategies",
    "limit": 5,
    "sort": "date"
  }'

# Health check
curl -X GET https://socrates-ai-nanda.onrender.com/health

# Simple search
curl -X POST https://socrates-ai-nanda.onrender.com/search \
  -H "Content-Type: application/json" \
  -d '{
    "q": "neural networks",
    "count": 3
  }'

Support