Citation Search API

Search Google Scholar and retrieve authoritative citation formats (MLA, APA, Chicago, Harvard, Vancouver) for each result. Citations come directly from Google Scholar.

POST/v1/cite/search

Citation Search

POST/v1/cite/search

Two-step process: search Google Scholar for papers, then fetch authoritative citation formats for each result. Returns up to 5 citation styles per paper.

Parameters

ParameterTypeRequiredDescription
querystringRequiredSearch query keywords
resultsintegerOptional (default: 10)Results per page (max 20, default 10)
pageintegerOptional (default: 0)Page number (default 0)
countrystringOptional (default: us)Country filter (default 'us')

Parameters

ParameterTypeRequiredDescription
querystringRequiredSearch query keywords
resultsintegerOptional (default: 10)Results per page (max 20)
pageintegerOptional (default: 0)Page number (0-based)
countrystringOptional (default: us)Country filter (e.g., 'us')

Response

Response
{
  "success": true,
  "message": "Found 10 papers with citations",
  "data": {
    "total_found": 156000,
    "citation_count": 10,
    "page": 0,
    "has_more": true,
    "papers": [
      {
        "index": 1,
        "title": "Attention Is All You Need",
        "source_url": "https://proceedings.neurips.cc/...",
        "cited_by": 120000,
        "citations": {
          "MLA": "Vaswani, Ashish, et al. \"Attention is all you need.\" NeurIPS 30 (2017).",
          "APA": "Vaswani, A., Shazeer, N., ... (2017). Attention is all you need. NeurIPS, 30.",
          "Chicago": "Vaswani, Ashish, et al. \"Attention is all you need.\" NeurIPS 30 (2017).",
          "Harvard": "Vaswani, A., Shazeer, N., ... 2017. Attention is all you need. NeurIPS, 30.",
          "Vancouver": "Vaswani A, Shazeer N, ... Attention is all you need. NeurIPS. 2017;30."
        }
      }
    ]
  }
}

Examples

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://api.qinyanai.com"

# Search citations
response = requests.post(
    f"{BASE_URL}/v1/cite/search",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "query": "attention is all you need",
        "results": 5,
        "page": 0,
        "country": "us"
    }
)
data = response.json()
for paper in data["data"]["papers"]:
    print(f"Title: {paper['title']}")
    print(f"APA: {paper['citations']['APA']}")
    print()