Sign inTry it

Search biomedical literature.

Searches PubMed (NLM, MEDLINE) like its search page: article title, authors, journal citation, PMID and link, in relevance order. First page of about 10 results.

No reports yetRead-only, no login
Site
PubMed, United States
Version
v1
Runs, last 7 days
No reports yet
sha256
bc5044366c3d…

Run it with your agent

after installing Wield

Ask in plain words. Your agent finds this recipe and calls it:

“Search biomedical literature.”

Read-only: it changes nothing on the site. No login needed.

{
  "tool": "run",
  "arguments": {
    "recipe_id": "pubmed.ncbi.nlm.nih.gov/search-papers",
    "params": {
      "query": "diabetes"
    }
  }
}

Requests

sent from your browser, in order
  1. 1GET/?termServer-rendered PubMed results page /?term=...; read-only GET. Each result is article.full-docsum; the PMID is on the title link.

Parameters

from your agent
querystringrequiredSearch term, e.g. 'diabetes', 'crispr', 'alzheimer', 'diabetes insipidus'

Returns

to your agent
articlesobject[]authors, citation, pmid, title, url
querystring

Where it can send

  • pubmed.ncbi.nlm.nih.gov

Anything else is blocked by the extension.

Reads from your session

Nothing. Your browser attaches the site's cookies by itself.

Used only in requests to the addresses on the left. Never sent to wield.run or your agent.

Checks

a run passes when
  • length(output.articles) > `0`
  • length(output.articles[?title != `null`]) == length(output.articles)
  • length(output.articles[?starts_with(url, 'https://pubmed.ncbi.nlm.nih.gov/')]) == length(output.articles)

Raw recipe

Served as canonical JSON from /api/v1/recipes/pubmed.ncbi.nlm.nih.gov/search-papers, so its sha256 matches the ETag and the index.

Check it yourself
curl -s https://wield.run/api/v1/recipes/pubmed.ncbi.nlm.nih.gov/search-papers | shasum -a 256
# bc5044366c3d0b1a0d9b8bb83bd7d48bfa4c44c0eb6d9d89c94d8c2dafda7ed5
pubmed.ncbi.nlm.nih.gov/search-papers.json, v1
{
  "description": "Searches PubMed (NLM, MEDLINE) like its search page: article title, authors, journal citation, PMID and link, in relevance order. First page of about 10 results.",
  "effect": "read",
  "id": "pubmed.ncbi.nlm.nih.gov/search-papers",
  "keywords": [
    "pubmed",
    "medline",
    "nlm",
    "ncbi",
    "pubmed.ncbi.nlm.nih.gov",
    "medizin",
    "studien",
    "publikationen",
    "biomedical",
    "medical research",
    "papers",
    "literature",
    "search"
  ],
  "output": {
    "schema": {
      "properties": {
        "articles": {
          "items": {
            "properties": {
              "authors": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "citation": {
                "description": "Journal, year, volume, pages and DOI as shown on PubMed",
                "type": [
                  "string",
                  "null"
                ]
              },
              "pmid": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "url"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "query": {
          "type": "string"
        }
      },
      "required": [
        "query",
        "articles"
      ],
      "type": "object"
    },
    "value": "{query: params.query, articles: steps.search.articles[?title != `null` && href != `null`].{title: title, pmid: pmid || `null`, authors: authors || `null`, citation: citation || `null`, url: join('', ['https://pubmed.ncbi.nlm.nih.gov', href])}}"
  },
  "params": {
    "additionalProperties": false,
    "properties": {
      "query": {
        "description": "Search term, e.g. 'diabetes', 'crispr', 'alzheimer', 'diabetes insipidus'",
        "maxLength": 100,
        "minLength": 2,
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "provenance": {
    "method": "har",
    "notes": "GET /?term=...: the HTML already contains the first page of results (article.full-docsum). Title is a.docsum-title (PubMed marks matched words with b tags, which the text extraction drops); PMID is the data-article-id attribute on the title link; authors and journal citation come from the full-citation spans. Abstract snippets are not returned.",
    "recorded_at": "2026-11-08T12:30:00.000Z",
    "recorded_by": "wield-forge (claude-haiku agent)"
  },
  "requires_login": false,
  "schema": "https://wield.run/schema/recipe/v1.json",
  "site": {
    "country": "US",
    "id": "pubmed.ncbi.nlm.nih.gov",
    "language": "en",
    "name": "PubMed",
    "origin": "https://pubmed.ncbi.nlm.nih.gov",
    "origins": [
      "https://pubmed.ncbi.nlm.nih.gov"
    ]
  },
  "steps": [
    {
      "description": "Server-rendered PubMed results page /?term=...; read-only GET. Each result is article.full-docsum; the PMID is on the title link.",
      "expect": {
        "content_type": "html",
        "status": [
          200
        ]
      },
      "extract": {
        "html_items": {
          "articles": {
            "fields": {
              "authors": {
                "selector": ".docsum-authors.full-authors"
              },
              "citation": {
                "selector": ".docsum-journal-citation.full-journal-citation"
              },
              "href": {
                "attr": "href",
                "selector": "a.docsum-title"
              },
              "pmid": {
                "attr": "data-article-id",
                "selector": "a.docsum-title"
              },
              "title": {
                "selector": "a.docsum-title"
              }
            },
            "max": 20,
            "selector": "article.full-docsum"
          }
        }
      },
      "id": "search",
      "request": {
        "headers": {
          "Accept": "text/html"
        },
        "method": "GET",
        "query": {
          "term": "{{params.query}}"
        },
        "url": "/"
      }
    }
  ],
  "task": "Search biomedical literature",
  "tos": {
    "notes": "Not reviewed. One search page per call, the same page a visitor loads. The site's terms on automated access were not checked.",
    "reviewed": false
  },
  "verify": {
    "checks": [
      "length(output.articles) > `0`",
      "length(output.articles[?title != `null`]) == length(output.articles)",
      "length(output.articles[?starts_with(url, 'https://pubmed.ncbi.nlm.nih.gov/')]) == length(output.articles)"
    ],
    "example_params": {
      "query": "diabetes"
    },
    "max_ms": 5000
  },
  "version": 1
}