Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Access PMC Open Access articles in BioC format for text mining
.claude/skills/brycewang-stanford-bioc-pmc-api/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-20 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 35% | 0% |
The BioC API provides full-text articles from PubMed Central (PMC) in the BioC format — a simplified XML/JSON structure designed specifically for biomedical text mining. Unlike the standard PMC OAI service (which returns JATS XML), BioC pre-segments text into passages with offset annotations, making it ideal for NLP pipelines, named entity recognition, relation extraction, and other text mining tasks. Free, no authentication required.
https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pmcoa.cgi/BioC_json/{PMCID}/unicodebash# JSON format (recommended for programmatic use) curl "https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pmcoa.cgi/BioC_json/PMC6267067/unicode" # XML format curl "https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pmcoa.cgi/BioC_xml/PMC6267067/unicode" # ASCII encoding (strips non-ASCII characters) curl "https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pmcoa.cgi/BioC_json/PMC6267067/ascii"
bash# Convert PMID to PMCID first, then query curl "https://www.ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/?ids=29346600&format=json" # Returns: {"records": [{"pmid": "29346600", "pmcid": "PMC6267067", ...}]}
json{ "source": "PMC", "date": "2024-01-15", "key": "collection.key", "documents": [ { "id": "PMC6267067", "passages": [ { "infons": { "section_type": "TITLE", "type": "title" }, "offset": 0, "text": "Article Title Here" }, { "infons": { "section_type": "ABSTRACT", "type": "abstract" }, "offset": 25, "text": "Background: This study investigates..." }, { "infons": { "section_type": "INTRO", "type": "paragraph" }, "offset": 350, "text": "The introduction text..." } ] } ] }
Key fields:
passages[].infons.section_type: TITLE, ABSTRACT, INTRO, METHODS, RESULTS, DISCUSS, CONCL, REF, FIG, TABLEpassages[].offset: Character offset from document startpassages[].text: Plain text content of the passagepythonimport requests import json def get_bioc_article(pmcid: str, fmt: str = "json") -> dict: """Fetch a PMC article in BioC format.""" url = f"https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pmcoa.cgi/BioC_{fmt}/{pmcid}/unicode" resp = requests.get(url, timeout=30) resp.raise_for_status() return resp.json() if fmt == "json" else resp.text def extract_sections(bioc_doc: dict) -> dict: """Extract text organized by section type.""" sections = {} for doc in bioc_doc.get("documents", []): for passage in doc.get("passages", []): section = passage.get("infons", {}).get("section_type", "OTHER") text = passage.get("text", "") sections.setdefault(section, []).append(text) return {k: "\n".join(v) for k, v in sections.items()} # Example: fetch and parse article = get_bioc_article("PMC6267067") sections = extract_sections(article) print(f"Title: {sections.get('TITLE', 'N/A')}") print(f"Abstract length: {len(sections.get('ABSTRACT', ''))} chars") print(f"Sections found: {list(sections.keys())}")
tool=your_tool_name&email=your@email.com to requests for priority queueWhen using this API in publications, cite: > Comeau DC, Wei CH, Islamaj Dogan R, Lu Z. PMC text mining subset in BioC: about 3 million full text articles and growing. Bioinformatics, btz070, 2019.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,184 | 11,623 | -28% | 1 | 1 | 0% | 2,754 | 3,617 | +31% | 0 | 0 | — |
case-02 | pass→pass | 7,314 | 3,691 | -50% | 1 | 1 | 0% | 1,493 | 2,020 | +35% | 0 | 0 | — |
case-03 | pass→pass | 17,442 | 3,126 | -82% | 1 | 1 | 0% | 2,890 | 1,870 | -35% | 0 | 0 | — |
case-04 | fail→pass | 14,248 | 4,635 | -67% | 1 | 1 | 0% | 2,333 | 2,147 | -8% | 0 | 0 | — |
case-05 | pass→pass | 6,636 | 3,108 | -53% | 1 | 1 | 0% | 1,250 | 1,931 | +54% | 0 | 0 | — |
case-06 | pass→pass | 5,083 | 2,693 | -47% | 1 | 1 | 0% | 823 | 1,839 | +123% | 0 | 0 | — |
case-07 | pass→pass | 4,729 | 2,847 | -40% | 1 | 1 | 0% | 801 | 1,817 | +127% | 0 | 0 | — |
case-08 | fail→pass | 9,178 | 2,331 | -75% | 1 | 1 | 0% | 1,599 | 1,784 | +12% | 0 | 0 | — |
case-09 | pass→pass | 9,331 | 3,236 | -65% | 1 | 1 | 0% | 1,408 | 1,842 | +31% | 0 | 0 | — |
case-10 | pass→pass | 8,555 | 2,540 | -70% | 1 | 1 | 0% | 1,441 | 1,715 | +19% | 0 | 0 | — |
case-11 | pass→pass | 6,078 | 2,572 | -58% | 1 | 1 | 0% | 1,079 | 1,605 | +49% | 0 | 0 | — |
case-12 | pass→pass | 6,478 | 1,767 | -73% | 1 | 1 | 0% | 1,111 | 1,589 | +43% | 0 | 0 | — |
case-13 | pass→pass | 9,075 | 2,223 | -76% | 1 | 1 | 0% | 1,392 | 1,677 | +20% | 0 | 0 | — |
case-14 | pass→pass | 4,195 | 2,310 | -45% | 1 | 1 | 0% | 610 | 1,669 | +174% | 0 | 0 | — |
case-15 | pass→pass | 12,335 | 5,427 | -56% | 1 | 1 | 0% | 2,025 | 2,298 | +13% | 0 | 0 | — |
case-16 | pass→pass | 12,307 | 3,490 | -72% | 1 | 1 | 0% | 2,000 | 1,919 | -4% | 0 | 0 | — |
case-17 | pass→pass | 13,411 | 11,008 | -18% | 1 | 1 | 0% | 2,370 | 3,343 | +41% | 0 | 0 | — |
case-18 | pass→pass | 12,665 | 5,024 | -60% | 1 | 1 | 0% | 1,736 | 2,194 | +26% | 0 | 0 | — |
case-19 | pass→pass | 14,661 | 8,998 | -39% | 1 | 1 | 0% | 2,051 | 2,607 | +27% | 0 | 0 | — |
case-20 | fail→pass | 9,852 | 2,488 | -75% | 1 | 1 | 0% | 1,732 | 1,663 | -4% | 0 | 0 | — |
case-21 | pass→pass | 12,589 | 1,863 | -85% | 1 | 1 | 0% | 2,000 | 1,596 | -20% | 0 | 0 | — |
case-22 | pass→pass | 7,052 | 2,336 | -67% | 1 | 1 | 0% | 1,085 | 1,640 | +51% | 0 | 0 | — |
case-23 | pass→pass | 12,692 | 12,007 | -5% | 1 | 1 | 0% | 2,121 | 3,610 | +70% | 0 | 0 | — |
case-24 | pass→pass | 15,873 | 10,411 | -34% | 1 | 1 | 0% | 2,814 | 3,264 | +16% | 0 | 0 | — |
case-25 | pass→pass | 11,691 | 9,209 | -21% | 1 | 1 | 0% | 1,936 | 3,012 | +56% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +16 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.