Uniprot Protein Scraper avatar

Uniprot Protein Scraper

Pricing

from $2.99 / 1,000 results

Go to Apify Store
Uniprot Protein Scraper

Uniprot Protein Scraper

UniProt Protein Scraper is a Python tool designed to automatically extract protein sequences, functional annotations, taxonomic data, and cross-references from the UniProt database, saving them into structured formats for bioinformatics research.

Pricing

from $2.99 / 1,000 results

Rating

0.0

(0)

Developer

ZeroBreak

ZeroBreak

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

UniProt Protein Scraper: Protein Entry Search

UniProt Protein Scraper

Search protein records using the public UniProt REST API. Retrieve protein information through keyword-based queries or look up specific records by accession number, then export results as JSON, CSV, or Excel.

No login or API key is required. The scraper supports paginated searches, duplicate-accession detection, request retries, and structured error reporting so that individual failures do not stop the entire run.

Features

  • Search UniProtKB records using UniProt query syntax.
  • Retrieve individual protein entries using accession numbers.
  • Extract protein names, organism information, gene names, sequence lengths, and additional annotations.
  • Select specific fields for search results.
  • Follow pagination to collect multiple pages of results.
  • Remove duplicate protein accessions.
  • Handle request timeouts, rate limits, and server errors.
  • Record failed inputs in structured error rows.
  • Schedule recurring runs to monitor protein annotation updates.
  • Export datasets as JSON, CSV, or Excel through the Apify interface.

Use Cases

  • Protein research: Search for insulin, specific genes, or organisms and collect matching UniProtKB records.
  • Accession lookup: Retrieve protein records using known accession numbers, such as P01308.
  • Annotation updates: Schedule periodic exports containing protein names, organisms, gene names, and sequence lengths.
  • Research pipelines: Export structured data for analysis with Python, Pandas, Jupyter notebooks, and scientific tools.
  • Data validation: Check whether a search returns reviewed Swiss-Prot records before running a larger collection task.

Input Parameters

ParameterTypeDefaultDescription
modestringsearchSelect search to query UniProtKB or entry to retrieve individual records by accession.
querystringinsulinUniProt query syntax used in search mode.
accessionsarrayP01308Protein accession numbers used in entry mode, with one accession per item.
fieldsstringaccession,protein_name,organism_name,length,gene_namesComma-separated list of fields returned by search mode.
maxItemsinteger100Maximum number of saved protein records. Allowed range: 1–1,000.
timeoutSecsinteger300Maximum total runtime in seconds, up to 3,600.
requestTimeoutSecsinteger30Maximum wait time for an individual HTTP request, in seconds.

Example Input

Search Protein Records

{
"mode": "search",
"query": "insulin",
"fields": "accession,protein_name,organism_name,length,gene_names",
"maxItems": 100,
"timeoutSecs": 300,
"requestTimeoutSecs": 30
}

Retrieve a Specific Protein Entry

Set mode to entry and provide one or more accession numbers in the accessions array.

{
"mode": "entry",
"accessions": [
"P01308"
],
"maxItems": 100,
"timeoutSecs": 300,
"requestTimeoutSecs": 30
}

What Data Does This Scraper Extract?

Each protein record is saved as a separate dataset item. Failed inputs are recorded in separate error rows containing the relevant error and input information. The scraper continues processing other records whenever possible.

Example Output

{
"entryType": "UniProtKB reviewed (Swiss-Prot)",
"primaryAccession": "P01308",
"organism": {
"scientificName": "Homo sapiens",
"commonName": "Human",
"taxonId": 9606
},
"proteinDescription": {
"recommendedName": {
"fullName": {
"value": "Insulin"
}
},
"flag": "Precursor"
},
"genes": [
{
"geneName": {
"value": "INS"
}
}
],
"sequence": {
"length": 110
},
"extraAttributes": {
"uniParcId": "UPI00000017EA"
},
"sourceUrl": "API_REQUEST_URL",
"scrapedAt": "2026-10-12T00:00:00+00:00"
}

The example uses a placeholder for the request URL. Actual output may contain additional information depending on the record and the API response.

Output Fields

FieldTypeDescription
entryTypestringUniProt entry classification supplied by the source.
primaryAccessionstringPrimary protein accession number. Duplicate accessions are removed.
organismobjectScientific name, common name, taxonomic ID, and lineage when available.
proteinDescriptionobjectRecommended protein name and chain information when available.
genesarrayGene names associated with the protein entry.
sequenceobjectSequence information, including length in search results.
extraAttributesobjectAdditional attributes, such as the UniParc identifier, when available.
sourceUrlstringRequest URL associated with the returned record.
scrapedAtstringUTC timestamp indicating when the record was saved.
errorstringError description, included only in error rows.
inputstringQuery, accession number, or other input associated with an error row.

Search responses are limited to the configured fields. Full entry responses can be large, so the scraper retains the same core dataset structure when processing individual accessions.

How It Works

  1. Validate inputs: Read the parameters and validate the configured limits.
  2. Send API requests: Query the public UniProt REST API using a descriptive User-Agent.
  3. Search records: In search mode, request JSON results using the selected fields and a page size of up to 500 records.
  4. Follow pagination: Continue through available pages until the item limit, runtime limit, or final page is reached.
  5. Retrieve individual entries: In entry mode, retrieve each valid accession once. Invalid accessions are recorded as error rows.
  6. Retry failed requests: Retry HTTP 429 responses, HTTP 5xx errors, and timeouts up to three additional times, using backoff delays of 2, 4, and 8 seconds. Respect longer server-provided retry delays where applicable.
  7. Control request rate: Maintain an approximate rate of three requests per second.
  8. Remove duplicates: Skip duplicate primaryAccession values and save collected records to the dataset.

Limits and Data Usage

  • Authentication: No API key or login is required.
  • Maximum records: Up to 1,000 saved protein records per run.
  • Default records: 100.
  • Search pagination: Up to 500 records per request.
  • Request rate: Approximately three requests per second, with retries when the service indicates that requests should be slowed down.
  • Licensing: UniProt data is available under the CC BY 4.0 license, subject to the applicable data and attribution terms.

When redistributing data, provide appropriate attribution and follow the applicable licensing requirements.

Frequently Asked Questions

Does UniProt Protein Scraper require an API key?

No. The public UniProt REST API can be accessed without an API key.

How many protein records can one run save?

The default limit is 100 records, and the maximum is 1,000. Select only the fields you need to reduce unnecessary data and improve processing efficiency.

What is the difference between search and entry mode?

Search mode accepts UniProt query syntax and retrieves matching records using the selected fields.

Entry mode retrieves individual protein records using their accession numbers and retains the same core dataset structure.

Why did I receive an error row instead of a protein record?

An empty query, invalid accession, non-JSON response, or final HTTP error may produce an error row containing the error description and original input. Other records can still be saved during the same run.

Can I export the results to CSV, JSON, and Excel?

Yes. The resulting dataset can be exported in JSON, CSV, or Excel format for further analysis, reporting, or integration with other data-processing workflows.

Can I schedule recurring protein searches?

Yes. Schedule recurring runs to refresh protein metadata and compare records across collection periods.

Pricing

The actor is free to run. Apify platform usage is subject to the applicable Apify plan and usage charges.

Trademark Notice

UniProt and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely for identifying the data source and does not imply affiliation, sponsorship, endorsement, or partnership.

Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with UniProt or its owners.

Data is collected from publicly accessible sources. Users are responsible for complying with applicable source terms, rate limits, licensing requirements, and attribution obligations.

Collecting publicly available data through a public API may be permitted, but the legality and conditions of use depend on the data, applicable laws, licensing terms, and intended purpose.

  • Personal data: If collected records contain personal information, applicable privacy laws may impose additional obligations. Collect and retain such information only when there is a legitimate and lawful basis.
  • Copyright and licensing: Protein records and associated annotations may be subject to specific licensing terms. Follow the applicable license and attribution requirements when redistributing data.
  • Terms of use: Respect the source's usage policies, request limits, and applicable data-use requirements.
  • Legal advice: This information is provided for general educational purposes and does not constitute legal advice. Consult a qualified professional if you need advice about a specific use case.