A Go-based REST API for scientific literature search across multiple academic databases.
SciFIND Backend provides a unified API for searching scientific papers from ArXiv, Semantic Scholar, Exa, and Tavily. It aggregates results from multiple providers into a single response.
- Go 1.24+
- PostgreSQL 15+ (production) or SQLite (development)
- Docker (optional)
git clone https://github.com/scifind/backend.git
cd scifind-backend
docker-compose up -dTest the API:
curl "http://localhost:8080/v1/search?query=quantum+computing&limit=5"git clone https://github.com/scifind/backend.git
cd scifind-backend
go mod download
go generate ./cmd/server
go build -o scifind-server ./cmd/server
./scifind-serverGET /v1/search- Search papers across providersGET /v1/papers- List papersGET /v1/papers/{id}- Get specific paperGET /v1/authors- List authorsGET /v1/authors/{id}- Get author detailsGET /health- Health checkGET /swagger/index.html- API documentation
Create a config.yaml file:
server:
port: 8080
mode: debug
database:
type: sqlite
sqlite:
path: ./scifind.db
auto_migrate: true
providers:
arxiv:
enabled: true
semantic_scholar:
enabled: true
api_key: "" # Optional
exa:
enabled: false
api_key: "" # Required
tavily:
enabled: false
api_key: "" # RequiredEnvironment variables override config file settings:
SCIFIND_SERVER_PORT- Server portSCIFIND_DATABASE_TYPE- Database typeSCIFIND_PROVIDERS_EXA_API_KEY- Exa API keySCIFIND_PROVIDERS_TAVILY_API_KEY- Tavily API key
go build ./cmd/server # Build server
go generate ./cmd/server # Generate Wire dependency injection
go test ./... # Run tests
go run ./cmd/server # Run server directlycmd/server/ # Main application
internal/
api/ # HTTP handlers and routing
config/ # Configuration management
models/ # Data models
providers/ # External API providers
repository/ # Database layer
services/ # Business logic
docs/ # Swagger documentation
- No API key required
- Physics, mathematics, computer science papers
- Free access
- API key optional for basic usage
- Enhanced rate limits with API key
- 200M+ academic papers
- API key required
- Neural search capabilities
- Paid service
- API key required
- Real-time web search
- Paid service
docker build -t scifind-backend .
docker run -p 8080:8080 -e SCIFIND_DATABASE_TYPE=postgres scifind-backendFor PostgreSQL:
createdb scifind
export SCIFIND_DATABASE_TYPE=postgres
export SCIFIND_DATABASE_POSTGRES_DSN="host=localhost user=postgres dbname=scifind sslmode=disable"The application follows clean architecture principles:
- Handlers: HTTP request/response handling
- Services: Business logic and provider coordination
- Repository: Data persistence layer
- Providers: External API integrations
Dependency injection is managed using Google Wire.
SciFIND provides a Model Context Protocol (MCP) server for AI assistants to search scientific papers.
search- Search scientific papers by queryget_paper- Get paper details by ID
Start the MCP server via stdio:
go run ./cmd/server --mcpSearch example:
{
"tool": "search",
"arguments": {
"query": "quantum computing"
}
}Get paper example:
{
"tool": "get_paper",
"arguments": {
"id": "paper-id-123"
}
}The MCP server can be configured in config.yaml:
mcp:
enabled: true
mode: stdio # or http
port: 8081 # for http modeMIT License
