API Integration
Guide to integrating Paperguide's API into your applications
API Overview
Paperguide provides a comprehensive REST API for programmatic access to all platform features. Use the API to integrate research capabilities into your applications.
hulala hulalal
RESTful Design
Standard REST endpoints with JSON responses for easy integration.
Comprehensive Coverage
Access to all research assistant, reference management, and writing features.
Authentication
Secure your API requests with bearer token authentication.
Generate API Key
Create an API key from your Paperguide account settings.
Include in Headers
Add the Authorization header to all API requests.
Handle Token Expiration
Implement token refresh logic for long-running applications.
curl -X GET \
'https://api.paperguide.com/v1/research' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json'
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.get(
'https://api.paperguide.com/v1/research',
headers=headers
)
data = response.json()
print(f"Found {len(data['papers'])} papers")
const axios = require('axios');
const config = {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.get('https://api.paperguide.com/v1/research', config)
.then(response => {
console.log(`Found ${response.data.papers.length} papers`);
})
.catch(error => {
console.error('API request failed:', error);
});
Core Endpoints
Access paper search and analysis capabilities.
Manage citations and reference collections.
Organize research into projects and folders.
Rate Limits and Quotas
API requests are subject to rate limits to ensure fair usage. Check your account for specific limits.
Error Handling
Implement robust error handling for API requests.
import requests
from requests.exceptions import RequestException
try:
response = requests.get('https://api.paperguide.com/v1/research', headers=headers)
response.raise_for_status()
data = response.json()
# Process successful response
except requests.exceptions.HTTPError as e:
if response.status_code == 401:
print("Authentication failed. Check your API key.")
elif response.status_code == 429:
print("Rate limit exceeded. Wait before retrying.")
else:
print(f"HTTP error: {e}")
except requests.exceptions.ConnectionError:
print("Network connection error. Check your internet connection.")
except requests.exceptions.Timeout:
print("Request timed out. Try again later.")
except ValueError:
print("Invalid JSON response from API.")
const axios = require('axios');
axios.get('https://api.paperguide.com/v1/research', config)
.then(response => {
// Process successful response
console.log(response.data);
})
.catch(error => {
if (error.response) {
// Server responded with error status
const status = error.response.status;
if (status === 401) {
console.error('Authentication failed. Check your API key.');
} else if (status === 429) {
console.error('Rate limit exceeded. Wait before retrying.');
} else {
console.error(`API error: ${status} - ${error.response.data.message}`);
}
} else if (error.request) {
// Network error
console.error('Network error. Check your connection.');
} else {
// Other error
console.error('Request setup error:', error.message);
}
});
Webhooks
Receive real-time notifications about research updates and analysis completions.
Use webhooks to trigger automated workflows in your research pipeline.
SDKs and Libraries
Official SDKs are available for popular programming languages.
pip install paperguide-sdk
npm install paperguide-sdk
Last updated 4 days ago