Repository navigation
feat(scholar): Firecrawl Research Index as a literature source - #170
Open
ChronodeAi wants to merge 1 commit into
Open
ChronodeAi wants to merge 1 commit into
ChronodeAi wants to merge 1 commit into
Conversation
Adds the 'firecrawl' scholar provider over GET /v2/search/research/papers (~43M abstracts: PubMed, PMC, bioRxiv, medRxiv, arXiv). Keyless; FIRECRAWL_API_KEY is sent as a bearer token when set. Thin hits merge into OpenAlex/Crossref by DOI: the published DOI wins over the 10.1101 preprint DOI, years come from arXiv ids and dated bioRxiv/medRxiv DOIs, and the landing URL prefers arXiv, then PMC, then DOI, then PubMed. In --scope papers; merge precedence after CORE.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
firecrawlprovider tohpr scholarfor the Firecrawl Research Index (GET /v2/search/research/papers). The index holds ~43M paper abstracts from PubMed, PMC, bioRxiv, medRxiv and arXiv, and is searched with a natural-language question. It is part of--scope papers, needs no key, and sendsFIRECRAWL_API_KEYas a bearer token when one is set (keyed rate limits).Why alongside OpenAlex rather than instead of it: no humanities, social science or books, and the search hits are thin (ids, title, abstract, score; no authors, year or venue). It goes after CORE in merge precedence, so the metadata sources win field conflicts and the thin hits fill in through the existing DOI merge.
Choices the code makes, each taken from live responses:
10.1101/…) and its published DOI, in either order. The merge never joins different DOIs, so the published DOI is used (it is the one OpenAlex and Crossref report) and the preprint DOI is kept inextra.preprint_doi.YYMM.NNNNNand the pre-2007archive/YYMMNNNform) and from dated10.1101/YYYY.MM.DD.…DOIs. It is only taken from a preprint DOI when the record has no published DOI, so a published article never gets its preprint's year.pdf_url), then PMC, then the DOI, then PubMed. The namespacedprimaryId(arxiv:,pmid:,pmcid:,doi:) is kept asidentifier, which is what the index's read and related-papers endpoints accept.Tests. 12 offline tests, including one that merges a thin hit into an OpenAlex record by DOI. Full suite: 1731 passed. Live check:
-s openalex -s firecrawlmerged the same paper into one record (also_in: openalex,firecrawl, year and authors from OpenAlex, PMID from Firecrawl). For "Attention Is All You Need" it returned the 2017 original, which OpenAlex's top 3 missed.README ("nine sources"), the agent-docs coverage list and the CHANGELOG are updated.