Literfy Open API v1 Guide

Mar 11, 2026

Literfy Open API v1 exposes authenticated endpoints for credit balance lookup and multi-source paper search, suitable for research automation, review workflows, and external integrations.

Get an API Key

  1. Sign in to Literfy and open your profile page at https://literfy.ai/settings/profile
  2. Click API Keys in the left sidebar
  3. Click Add to create a new key
  4. Enter a name for the key, for example My Research App
  5. Copy the generated key immediately

Authentication

All requests must include your API key in the Authorization header:

Authorization: Bearer <your_api_key>

Rate Limit

ItemValue
Request rate1 request per second for each API key

Credit Cost

EndpointCredits consumed
GET /api/open/v1/balance0
GET /api/open/v1/search2 credits per selected source

Endpoints

Balance Query

GET /api/open/v1/balance

Return the remaining credit balance for the account bound to the API key.

Response Format

{
  "remainingCredits": 128
}

Examples

cURL
curl "https://literfy.ai/api/open/v1/balance" \
  -H "Authorization: Bearer sk_your_api_key"
JavaScript
const response = await fetch('https://literfy.ai/api/open/v1/balance', {
  headers: {
    Authorization: 'Bearer sk_your_api_key',
  },
});

const data = await response.json();
console.log(data.remainingCredits);
Python
import requests

response = requests.get(
    "https://literfy.ai/api/open/v1/balance",
    headers={"Authorization": "Bearer sk_your_api_key"},
)

data = response.json()
print(data["remainingCredits"])

GET /api/open/v1/search

Search papers across multiple academic databases.

Query Parameters

ParameterTypeRequiredDefaultDescription
topicstringYes-Search keyword, up to 300 characters
google-scholarnumberNo-Number of papers from Google Scholar, from 1 to 60
pubmednumberNo-Number of papers from PubMed, from 1 to 100
wanfangnumberNo-Number of papers from Wanfang, from 1 to 100

Notes:

  • At least one source parameter is required.
  • Each source returns up to 100 papers per request.
  • If topic exceeds 300 characters, the API returns INVALID_PARAMS.
  • When you query multiple sources, Literfy deduplicates results by title automatically.

Response Format

The endpoint returns a Server-Sent Events (SSE) stream.

Event Types

paper: a single paper result

{
  "paperId": "abc123",
  "source": "google-scholar | pubmed | wanfang",
  "title": "Paper title",
  "abstract": "Paper abstract...",
  "authors": [{ "name": "Author Name" }],
  "year": 2024,
  "venue": "Conference or journal",
  "url": "https://...",
  "doi": "10.1234/...",
  "citationCount": 100,
  "influentialCitationCount": 10,
  "volume": "12",
  "issue": "3",
  "pages": "123-456",
  "isOpenAccess": true,
  "pdfUrl": "https://...",
  "resourceType": "Periodical",
  "bibtex": "@article{...}",
  "venueName": "Full venue name",
  "venueType": "conference | journal",
  "venueCCFRank": "A/B/C",
  "venueQuartile": "Q1/Q2/Q3/Q4",
  "venueIf": 8.6,
  "venueCASZone": 1,
  "venueCnTags": ["JCR Q1", "CAS Zone 1"]
}

Available fields vary by source, so not every paper includes every field.

done: search completed

{
  "total": 50
}

error: request failed

{
  "error": "Error message"
}

You can use any of the examples below to validate the stream and handle paper, done, and error events on the client side.

Search Examples

cURL
curl -N "https://literfy.ai/api/open/v1/search?topic=large%20language%20models&google-scholar=50&pubmed=30&wanfang=20" \
  -H "Authorization: Bearer sk_your_api_key"
JavaScript
const response = await fetch(
  'https://literfy.ai/api/open/v1/search?topic=transformer+architecture&google-scholar=50&pubmed=30',
  {
    headers: {
      Authorization: 'Bearer sk_your_api_key',
    },
  }
);

const reader = response.body.getReader();
const decoder = new TextDecoder();

while (true) {
  const { done, value } = await reader.read();
  if (done) break;

  const text = decoder.decode(value);
  const lines = text.split('\n');

  for (const line of lines) {
    if (line.startsWith('data: ')) {
      const data = JSON.parse(line.slice(6));
      console.log(data);
    }
  }
}
Python
import requests

url = "https://literfy.ai/api/open/v1/search"
params = {
    "topic": "deep learning",
    "google-scholar": 50,
    "pubmed": 30,
    "wanfang": 20
}
headers = {
    "Authorization": "Bearer sk_your_api_key"
}

response = requests.get(url, params=params, headers=headers, stream=True)

for line in response.iter_lines():
    if line:
        line = line.decode("utf-8")
        if line.startswith("data: "):
            import json
            data = json.loads(line[6:])
            print(data)

Error Codes

Error codeHTTP statusDescription
MISSING_API_KEY401Missing Authorization header
INVALID_API_KEY_FORMAT401Invalid Authorization header format
INVALID_API_KEY401API key is invalid or disabled
RATE_LIMIT_EXCEEDED429Too many requests
INSUFFICIENT_CREDITS402Not enough credits for search
INVALID_PARAMS400Missing or invalid parameters

Available Sources

SourceIdentifierCoverageNotable fields
Google Scholargoogle-scholarComprehensive academic literaturecitationCount, summary
PubMedpubmedBiomedical researchvolume, issue, pages, bibtex
WanfangwanfangChinese academic literaturepdfUrl, resourceType
Literfy

Literfy

Literfy Open API v1 Guide | Literfy Blog | Literature Review Tips & Research Strategies