> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Protein Function

> Look up a protein’s function, literature citations, organism, cellular locations and catalytic activities by accession.

Protein annotations from UniProt under CC BY 4.0, attributed to the UniProt Consortium. Covers reviewed and unreviewed UniProtKB entries. Function texts retain their literature citations, with deduplicated PubMed identifiers also returned separately. Includes names, genes, organism, length, subcellular locations, catalytic activities, EC numbers, keywords and annotation score. UniProt releases updates every eight weeks; last\_updated is the entry’s last annotation date. The amino-acid sequence is returned only when include\_sequence is true, otherwise null. Absent values and collections are null. A merged accession resolves to its primary entry. A deleted or demerged accession returns no protein and the source’s structured inactive reason, including replacement accessions when supplied. No match returns null for both.

## Authentication

Requires x402 payment in the `payment-signature` header.

## Request Body

<ParamField body="accession" type="string" required>
  The UniProt accession identifying the protein, for example P04637.
</ParamField>

<ParamField body="include_sequence" type="boolean">
  Include the amino-acid sequence. Defaults to `false`.
</ParamField>

<Snippet file="audit-context-params.mdx" />

## Response (200 OK)

Top-level envelope: `success` (boolean) and `data` (object). All fields below are nested under `data`.

<ResponseField name="data.request_id" type="string">
  Durable job ID for audit and lookup
</ResponseField>

<ResponseField name="data.status" type="string">
  Job status: `completed`
</ResponseField>

<ResponseField name="data.tool" type="string">
  Always `protein_function`
</ResponseField>

<ResponseField name="data.result" type="object">
  The answer, described under Result below
</ResponseField>

<ResponseField name="data.evidence" type="object">
  Where the answer came from and when
</ResponseField>

<ResponseField name="data.evidence.source" type="string">
  The public body the data comes from. Always `UniProt Consortium`.
</ResponseField>

<ResponseField name="data.evidence.source_kind" type="string">
  `public` when the data comes from a public body, `commercial` otherwise
</ResponseField>

<ResponseField name="data.evidence.retrieved_at" type="string">
  When the lookup was made, as an ISO 8601 UTC time
</ResponseField>

<ResponseField name="data.evidence.as_of" type="string">
  When the source says the fact was last updated, or `null` when the source gives no date
</ResponseField>

## Result

Nested under `data.result`.

<ResponseField name="data.result.protein" type="object">
  Protein. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.accession" type="string">
  Accession. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.entry_name" type="string">
  Entry name. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.reviewed" type="boolean">
  Reviewed. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.protein_name" type="string">
  Protein name. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.alternative_names" type="string[]">
  Alternative names. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.genes" type="object[]">
  Genes. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.genes[].name" type="string">
  Name. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.genes[].synonyms" type="string[]">
  Synonyms. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.organism" type="object">
  Organism. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.organism.scientific_name" type="string">
  Scientific name. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.organism.taxon_id" type="number">
  Taxon id. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.length" type="number">
  Length. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.function" type="string[]">
  FUNCTION comment texts, retaining the source’s literature citations. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.evidence_pubmed_ids" type="string[]">
  Distinct PubMed identifiers from FUNCTION text evidences. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.subcellular_locations" type="object[]">
  Subcellular locations. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.subcellular_locations[].location" type="string">
  Location. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.subcellular_locations[].isoform" type="string">
  Isoform. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.catalytic_activities" type="object[]">
  Catalytic activities. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.catalytic_activities[].reaction" type="string">
  Reaction. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.catalytic_activities[].ec" type="string">
  Ec. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.ec_numbers" type="string[]">
  Ec numbers. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.keywords" type="object[]">
  Keywords. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.keywords[].id" type="string">
  Id. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.keywords[].category" type="string">
  Category. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.keywords[].name" type="string">
  Name. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.annotation_score" type="number">
  Annotation score. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.last_updated" type="string">
  Last annotation update date, YYYY-MM-DD. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.protein.sequence" type="string">
  Amino-acid sequence, only when requested. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.inactive_reason" type="object">
  Inactive reason. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.inactive_reason.reason_type" type="string">
  The source’s reason for inactivation, for example DELETED or DEMERGED. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.inactive_reason.replacement_accessions" type="string[]">
  Replacement accessions for a demerged entry. `null` when the source gives no value.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/tools/lookup/protein-function \
    -H "Content-Type: application/json" \
    -H "payment-signature: <base64 x402 payment>" \
    -d '{
      "accession": "P29358",
      "include_sequence": false
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://win.oneshotagent.com/v1/tools/lookup/protein-function", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "payment-signature": paymentProof,
    },
    body: JSON.stringify({
      "accession": "P29358",
      "include_sequence": false
    }),
  });
  ```

  ```typescript SDK theme={null}
  const result = await agent.tool('lookup/protein-function', {
    accession: 'P29358',
    include_sequence: false
  });
  console.log(result.data.result);
  console.log(result.data.evidence);
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200) theme={null}
  {
    "success": true,
    "data": {
      "request_id": "uuid",
      "receipt_id": "rcpt_...",
      "status": "completed",
      "tool": "protein_function",
      "result": {
        "protein": null,
        "inactive_reason": {
          "reason_type": "DEMERGED",
          "replacement_accessions": [
            "P68251",
            "P68250"
          ]
        }
      },
      "evidence": {
        "source": "UniProt Consortium",
        "source_kind": "public",
        "retrieved_at": "2026-01-15T12:00:00.000Z",
        "calls": [
          {
            "retrieved_at": "2026-01-15T12:00:00.000Z"
          }
        ],
        "as_of": null
      }
    }
  }
  ```
</ResponseExample>

<Info>See [Pricing](/pricing) for this tool's price. A wallet (x402) call receives it in the 402 quote before anything is charged; a call paid from prepaid credits is charged when the API accepts the request and answers `200`.</Info>

## Notes

* Results return inline. The finished job stays available at `/v1/requests/{request_id}`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.