pubmed_fetch
Retrieve open access full-text articles from PubMed Central using PMC IDs. Supports XML or plain text formats for structured biomedical research content.
Instructions
Fetch full-text article from PubMed Central (PMC).
This function retrieves open access full-text articles from PMC using the PMC OAI service. Only works for open access articles that have a PMC ID.
Args: pmc_id: PMC identifier (with or without 'PMC' prefix, e.g., "PMC123456" or "123456") format: Output format - "xml" for structured XML or "text" for plain text (default: "xml") timeout: Request timeout in seconds (default: 30)
Returns: Dictionary containing the full-text article and metadata: - success (bool): Whether fetch was successful - pmc_id (str): The PMC identifier - format (str): Format of returned content - content (str): Full-text article content - content_length (int): Length of content in characters - error (str): Error message if unsuccessful
Examples: >>> result = pubmed_fetch("PMC3539452") >>> if result["success"]: ... print(result["content"][:100])
Note: - Only works for open access articles - Articles without PMC IDs cannot be fetched - Rate limiting applies (use with entrez_rate_limit context manager) - XML format preserves structure (sections, figures, tables, references) - Text format provides simplified plain text extraction
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pmc_id | Yes | ||
| format | No | xml | |
| timeout | No |