Skip to content

feat(sources): add Semantic Scholar adapter with citation context #3

@foundatron

Description

@foundatron

Problem Statement

The Semantic Scholar adapter needs API key support (for higher rate limits), citation count filtering, and the ability to fetch related papers through citation graphs.

Proposed Change

Enhance the Semantic Scholar adapter with production features.

Files to Modify

  • tentacle/sources/semantic_scholar.py - Add API key header (S2_API_KEY env var), citation count minimum filter, retry logic, date range filtering
  • tentacle/config.py - Add s2_api_key config field
  • tests/test_sources.py - Add tests for API key header, filtering, error handling

Acceptance Criteria

  • API key passed via x-api-key header when configured
  • Minimum citation count filter (configurable, default 0)
  • Date range filtering (publicationDate parameter)
  • Retry on HTTP 429 with Retry-After header respect
  • Tests cover API key injection, empty results, API errors

Design Notes

Semantic Scholar free tier: 100 requests/5 min. With API key: 1 request/second. The publicationDate filter uses YYYY-MM-DD:YYYY-MM-DD format.


Generated by tentacle bootstrap plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions