A database of RNA aptamers
Example: RNA aptamer ATP aptamer Structure
Version: 1.0
Last Updated: June 20, 2025
The Ribocentre-Aptamer platform provides a simple yet powerful API for programmatic access to our aptamer database. Our API is designed to support researchers in automated data retrieval and integration with existing research workflows.
Key Features:
/sequences/
) and dedicated JSON API (/api/
)https://aptamer.ribocentre.org
The primary API endpoint is built around our sequences page, which provides access to comprehensive aptamer sequence data.
GET /sequences/ # Interactive web interface with search filtering
GET /api/ # Dedicated JSON API endpoint
Search across all fields in the aptamer database using a single search term. Both endpoints support real-time search filtering.
Parameter: search
Type: String
Description: Search across all aptamer fields (sequence, ligand, name, etc.)
Example: ?search=thrombin
# Example: Search for "thrombin" across all fields (HTML interface)
curl "https://aptamer.ribocentre.org/sequences/?search=thrombin"
# Example: Search via dedicated JSON API
curl "https://aptamer.ribocentre.org/api/?search=thrombin"
Filter the database to show only specific aptamer entries by their unique identifier.
Parameter: id
Type: String
Description: Filter results to show only the aptamer with the specified ID
Example: ?id=ATP_Szostak_1
# Example: Get specific aptamer by ID (HTML interface)
curl "https://aptamer.ribocentre.org/sequences/?id=ATP_Szostak_1"
# Example: Get specific aptamer via JSON API
curl "https://aptamer.ribocentre.org/api/?id=ATP_Szostak_1"
Get data in JSON format instead of HTML.
Parameter: format
Type: String
Values: json
Description: Return data in JSON format
Example: ?format=json
# Example: Get search results in JSON format
curl "https://aptamer.ribocentre.org/sequences/?search=ATP&format=json"
Access the dedicated JSON API endpoint for programmatic access with enhanced debugging information.
Endpoint: /api/
Parameters: All same parameters as /sequences/
endpoint (search, id, category, type, limit, offset)
Format: Always returns JSON with comprehensive response metadata
# Example: Search for ATP-related aptamers via JSON API
curl "https://aptamer.ribocentre.org/api/?search=ATP"
# Example: Get paginated results
curl "https://aptamer.ribocentre.org/api/?search=DNA&limit=10&offset=0"
The sequences endpoint returns data in HTML format with structured table content including complete aptamer information. When search parameters are provided, the HTML interface displays filtered results with a clear indication of the search query and result count, plus a link to clear the search and return to all data.
When using format=json
parameter or the /api/
endpoint, the response includes enhanced debugging information:
{
"success": true,
"message": "Found 5 result(s)" | "No results found",
"query": {
"search": "ATP",
"id": null,
"category": null,
"type": null,
"timestamp": "2025-01-01T12:00:00.000Z",
"endpoint": "/api/"
},
"statistics": {
"total_in_database": 250,
"filters_applied": ["Search for \"ATP\""],
"filtered_results": 5,
"returned_results": 5
},
"suggestions": [...], // Only when no results found
"data": [...]
}
Each aptamer entry contains the following fields:
Field | Type | Description |
---|---|---|
ID |
String | Unique identifier for the aptamer |
Type |
String | Type classification (e.g., RNA, DNA) |
Category |
String | Functional category |
Named |
String | Aptamer name with link to detailed page |
Article name |
String | Associated research publication |
Ligand |
String | Target molecule or protein |
Ligand Description |
Text | Detailed description of the target |
CAS |
String | Chemical Abstracts Service number |
Sequence |
String | Nucleotide sequence (5’ to 3’) |
Length |
Integer | Sequence length in nucleotides |
GC Content |
Float | GC content percentage |
Affinity |
String | Binding affinity (Kd values) |
Year |
Integer | Year of discovery/publication |
Retrieve all aptamer data (HTML interface):
https://aptamer.ribocentre.org/sequences/
Search for aptamers containing “thrombin” (returns filtered HTML results):
https://aptamer.ribocentre.org/sequences/?search=thrombin
Search with JSON response (sequences endpoint):
https://aptamer.ribocentre.org/sequences/?search=ATP&format=json
Use the dedicated JSON API (always returns JSON):
https://aptamer.ribocentre.org/api/?search=ATP
Get paginated results:
https://aptamer.ribocentre.org/api/?search=DNA&limit=10&offset=0
Retrieve specific aptamer by ID (HTML):
https://aptamer.ribocentre.org/sequences/?id=ATP_Szostak_1
Retrieve specific aptamer by ID (JSON):
https://aptamer.ribocentre.org/api/?id=ATP_Szostak_1
# Search with detailed debugging info
curl -s "https://aptamer.ribocentre.org/api/?search=123" | jq .
# Check if search has results
curl -s "https://aptamer.ribocentre.org/api/?search=nonexistent" | jq '.message'
# Output: "No results found"
# Get statistics about your search
curl -s "https://aptamer.ribocentre.org/api/?search=ATP" | jq '.statistics'
# Shows: total_in_database, filters_applied, filtered_results, etc.
# Get suggestions when no results found
curl -s "https://aptamer.ribocentre.org/api/?search=xyz123" | jq '.suggestions'
# Check if request was successful
curl -s "https://aptamer.ribocentre.org/api/?search=ATP" | jq '.success'
# Get human-readable message
curl -s "https://aptamer.ribocentre.org/api/?search=ATP" | jq '.message'
# Count results
curl -s "https://aptamer.ribocentre.org/api/?search=ATP" | jq '.statistics.filtered_results'
# Handle no results case
result=$(curl -s "https://aptamer.ribocentre.org/api/?search=notfound")
if [[ $(echo "$result" | jq -r '.statistics.filtered_results') -eq 0 ]]; then
echo "No aptamers found. Suggestions:"
echo "$result" | jq -r '.suggestions[]'
fi
Here’s a simple Python script to fetch aptamer data:
import requests
from bs4 import BeautifulSoup
def get_aptamer_data(aptamer_id=None):
"""
Retrieve aptamer data from Ribocentre-Aptamer database
Args:
aptamer_id (str, optional): Specific aptamer ID to retrieve
Returns:
Parsed HTML content with aptamer data
"""
base_url = "https://aptamer.ribocentre.org/sequences/"
if aptamer_id:
url = f"{base_url}?id={aptamer_id}"
else:
url = base_url
response = requests.get(url)
if response.status_code == 200:
return BeautifulSoup(response.content, 'html.parser')
else:
raise Exception(f"API request failed: {response.status_code}")
# Example usage
try:
# Get specific aptamer
soup = get_aptamer_data("ATP-aptamer")
# Parse table data
table = soup.find('table', {'id': 'seqTable'})
rows = table.find('tbody').find_all('tr')
for row in rows:
cells = row.find_all('td')
print(f"Aptamer: {cells[4].text.strip()}")
print(f"Sequence: {cells[9].text.strip()}")
print(f"Ligand: {cells[6].text.strip()}")
print("---")
except Exception as e:
print(f"Error: {e}")
The sequences page also provides client-side search functionality that filters the displayed data in real-time. This search feature:
The search is implemented using JavaScript and filters data dynamically:
// Example of how search filtering works
const searchTerm = "ATP";
const filteredData = allData.filter(row => {
return row.some(cell =>
cell.toString().toLowerCase().includes(searchTerm.toLowerCase())
);
});
The sequences page provides export functionality for research use:
Currently, there are no specific rate limits imposed on API usage. However, we request that users:
Errors are returned as HTML pages with appropriate HTTP status codes. For programmatic access, check the HTTP status code and handle accordingly.
Currently, data is available in:
Planned API improvements include:
For API-related questions or technical issues:
Email: contact@ribocentre.org
Subject: API Support - [Your Query]
This documentation is updated regularly. For the latest information, please check:
We encourage the research community to:
This API documentation aims to advance aptamer science by supporting the global research community through programmatic data access.