1. Overview
The AGRP public API provides structured access to selected platform resources. It can be used to list available datasets, check file availability, download genome-related files, and query public data tables or JSON resources.
2. Quick Start
All current API endpoints are under the following base URL:
https://asteraceae.cgrpoee.top/api/
- Choose the resource group you need, such as genome files, Genomics annotations, Geno-Syn comparative data, or Multi-Omics data.
- Find the endpoint in the tables below and include all required parameters in the URL query string.
- Add optional filters such as limit, offset, q, or gene_id only when they are needed.
- Send a GET request with curl, a browser, Python, R, or another HTTP client.
Example: check and download a genome file
For file downloads, it is recommended to check the file first and then download it.
# 1. Check whether the file exists
curl -i "https://asteraceae.cgrpoee.top/api/files/genome/?species=Aann&type=cds"
# 2. Download the file
curl -L -o Aann.cds "https://asteraceae.cgrpoee.top/api/download/genome/?species=Aann&type=cds"
Example: query data with a limit
For large query endpoints, use limit to return a manageable number of records. The default limit is 20 records. For public access, the maximum allowed limit is 100 records per request; authorized API-key users may have higher limit caps.
curl -i "https://asteraceae.cgrpoee.top/api/genomics/kegg/?species=Aann&limit=5"
3. General Rules
| Item | Rule | Example |
|---|---|---|
| HTTP method | All current endpoints use GET. | curl -i "URL" |
| Response format | Most endpoints return JSON. Download endpoints return file streams when the requested file exists. | application/json or attachment download |
| Required parameters | Some endpoints require parameters such as species, type, dataset, query_genome, or filename. | ?species=Aann&type=cds |
| Pagination | List endpoints usually support limit and offset. The default limit is 20. For public access, the maximum returned records per request is 100; authorized API-key users may have higher limit caps. | ?limit=20&offset=40 |
| Search filters | Some endpoints support keyword or field filters such as q, gene_id, species, database, or query_genome. | ?q=Aann&limit=5 |
| File and name safety | Download-related names use safe identifiers such as letters, numbers, underscores, hyphens, and dots. Filename values that contain spaces should be URL-encoded. | Aann, AAKI, Dapi_white%20petal.json |
4. Health Check and Client IP
Use this endpoint to check whether the AGRP API service is running.
Request
curl -H "Accept: application/json" "https://asteraceae.cgrpoee.top/api/ping/"
Response example
{
"status": "ok",
"message": "AGRP API is running",
"version": "1.0",
"base_url": "https://asteraceae.cgrpoee.top/api/"
}
Use this endpoint to check the public client IP address detected by the AGRP API service. For IPv4 whitelist applications, use the IPv4 command below from the actual server or computer that will access AGRP, and send the returned IPv4 address to the AGRP team.
Request: check the detected IPv4 address
curl -4 -i "https://asteraceae.cgrpoee.top/api/whoami/"
Response example
{
"status": "ok",
"detected_ip": "203.0.113.10",
"ip_source": "CF-Connecting-IP",
"is_private_or_local": false,
"message": "This is the client IP address detected by the AGRP API for this request."
}
5. Genomics APIs
Genomics APIs provide access to genome file resources and selected annotation datasets.
5.1 Genome File APIs
These endpoints are used to list species, check whether genome files exist, and download genome files.
Supported file types: cds, pep, lens, gff.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/genomics/species/ | List species with available genome resources. | None |
| GET/api/files/genome/species/ | Alias endpoint for genome species resources. | None |
| GET/api/files/genome/ | Check whether a genome file exists. | species required; type required. |
| GET/api/download/genome/ | Download a genome file. | species required; type required. |
curl -i "https://asteraceae.cgrpoee.top/api/genomics/species/"
curl -i "https://asteraceae.cgrpoee.top/api/files/genome/?species=Aann&type=lens"
curl -L -o Aann.lens "https://asteraceae.cgrpoee.top/api/download/genome/?species=Aann&type=lens"
5.2 Annotation and Functional Genomics APIs
These endpoints query public annotation and functional genomics records. Use limit to avoid returning too many records at once.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/genomics/interproscan/ | Query InterProScan annotation data. | species required; optional database, q, limit, offset. |
| GET/api/genomics/kegg/ | Query KEGG annotation data. | species required; optional q, limit, offset. |
| GET/api/genomics/regulatory-proteins/ | Query regulatory protein or transcription factor data. | Optional species, type, q, limit, offset. |
| GET/api/genomics/m6a/ | Query m6A-related gene information. | Optional species, first_class, hmm_id, limit, offset. |
| GET/api/genomics/duplication-types/ | Query duplication type data. | Optional species, gene_id, limit, offset. |
curl -i "https://asteraceae.cgrpoee.top/api/genomics/interproscan/?species=Aann&database=Pfam&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genomics/kegg/?species=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genomics/regulatory-proteins/?species=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genomics/m6a/?species=Aann&first_class=readers&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genomics/duplication-types/?species=Aann&limit=5"
5.3 Transposable Elements APIs
These endpoints list species with available transposable element resources and query TE records for a selected species.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/genomics/transposable-elements/species/ | List species with available TE JSON resources. | None |
| GET/api/genomics/transposable-elements/ | Query TE records for one species. | species required; optional q, limit, offset. |
curl -i "https://asteraceae.cgrpoee.top/api/genomics/transposable-elements/species/"
curl -i "https://asteraceae.cgrpoee.top/api/genomics/transposable-elements/?species=Artemisia_annua&limit=5"
6. Geno-Syn APIs
Geno-Syn APIs provide access to comparative genomics resources, ancestral genome files, collinearity data, block data, hierarchical data, and selected gene datasets.
6.1 Ancestral Genome File APIs
These endpoints are used to list ancestral genome datasets, check file availability, and download ancestral genome files.
Supported file types: cds, pep, lens, gff. Example datasets: AAKI, AAKII, ACAK, ASAKI, CAAKI, CIAKI.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/genosyn/ancestral-genomes/ | List ancestral genome datasets and file availability. | None |
| GET/api/files/ancestral/ | Check whether an ancestral genome file exists. | dataset required; type required. |
| GET/api/download/ancestral/ | Download an ancestral genome file. | dataset required; type required. |
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/ancestral-genomes/"
curl -i "https://asteraceae.cgrpoee.top/api/files/ancestral/?dataset=AAKI&type=cds"
curl -L -o AAKI.cds "https://asteraceae.cgrpoee.top/api/download/ancestral/?dataset=AAKI&type=cds"
6.2 Collinearity and Dotplot Static JSON APIs
These endpoints query static JSON resources used by collinearity and dotplot pages.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/genosyn/collinear-kaks/ | Query collinearity and Ka/Ks records. | Optional q, limit, offset. |
| GET/api/genosyn/dotplots/ | Query dotplot records. | Optional q, limit, offset. |
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/collinear-kaks/?q=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/dotplots/?q=Hean&limit=5"
6.3 Geno-Syn Database Query APIs
These endpoints query database-backed comparative genomics resources. Some endpoints require a resource-specific parameter, such as query_genome.
The block-details endpoint returns block-level records for the selected query_genome. Use gene_id or block_id only when you want to narrow the result to a known exact identifier.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/genosyn/blocks/ | Query Aster-Blocks summary data. | query_genome required; optional reference_genome, limit, offset. |
| GET/api/genosyn/block-details/ | Query block-level gene details. | query_genome required; optional gene_id, block_id, limit, offset. |
| GET/api/genosyn/hierarchical-alignments/ | Query hierarchical multiple genome alignment data. | Optional reference, q, limit, offset. Example references: Hean, Eupl, Vivi, Lssa. |
| GET/api/genosyn/hierarchical-genes/ | Query hierarchical gene data. | Optional reference, species, gene_id, limit, offset. |
| GET/api/genosyn/evogenes/ | Query Aster-Evogenes data. | Optional gene_id, species, function, limit, offset. |
| GET/api/genosyn/orthologous/ | Query orthologous gene data. | Optional gene_id, orthogroup, species, limit, offset. |
| GET/api/genosyn/gene-families/ | Query gene family data. | Optional gene_id, species, family, limit, offset. |
| GET/api/genosyn/rubber-genes/ | Query rubber biosynthesis gene data. | Optional gene_id, species, function, limit, offset. |
| GET/api/genosyn/inulin-genes/ | Query inulin metabolism gene data. | Optional gene_id, species, function, limit, offset. |
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/blocks/?query_genome=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/block-details/?query_genome=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/hierarchical-alignments/?reference=Hean&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/hierarchical-genes/?reference=Hean&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/evogenes/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/orthologous/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/gene-families/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/rubber-genes/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/inulin-genes/?limit=5"
7. Multi-Omics APIs
Multi-Omics APIs provide access to pan-genome, transcriptome, expression, and metabolomics resources.
| Endpoint | Purpose | Parameters |
|---|---|---|
| GET/api/multiomics/pangenome/ | Query pan-genome records. | Optional q, limit, offset. |
| GET/api/multiomics/transcriptome/samples/ | List available transcriptome sample JSON files. | Optional q, limit, offset. |
| GET/api/multiomics/transcriptome/sample/ | Read one transcriptome sample JSON file. | filename required. |
| GET/api/multiomics/transcriptome/expression/ | Query transcriptome expression data. | species required; optional gene_id, expression_index, limit, offset. |
| GET/api/multiomics/metabolomics/plant/ | Query plant metabolomics records. | Optional cid, q, limit, offset. |
| GET/api/multiomics/metabolomics/scent/ | Query scent metabolomics records. | Optional cid, q, limit, offset. |
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/pangenome/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/transcriptome/samples/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/transcriptome/sample/?filename=Dapi_white%20petal.json"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/transcriptome/expression/?species=Aann&expression_index=TPM&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/metabolomics/plant/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/metabolomics/scent/?limit=5"
8. Rate Limits and Fair Use
The AGRP API provides public read-only access to selected Asteraceae genomic, comparative genomics, and multi-omics resources. Authentication is not required for standard query and download endpoints.
To maintain stable service for all users, API requests are rate-limited by client access level. Standard public users are limited by IP address. Authorized collaborators may receive higher quotas through registered IP addresses or dedicated API keys.
Current public limits
| Endpoint group | Current public limit | Notes |
|---|---|---|
| /api/download/ | 5 requests per minute per IP; up to 2 concurrent download requests per IP. | Applies to genome and ancestral genome file downloads. |
| /api/files/ | 60 requests per minute per IP. | Applies to file availability checks and file metadata endpoints. |
| /api/genomics/, /api/genosyn/, /api/multiomics/ | 120 requests per minute per IP. | Applies to public JSON and database query endpoints. |
| /api/ping/ | 60 requests per minute per IP. | Applies to the API health check endpoint. |
| limit parameter | Default: 20 records; maximum: 100 records per request. | Large values such as limit=999999 are automatically capped at 100 for public access. |
Authorized high-throughput access
For large-scale batch access, authorized collaborators may be granted higher quotas by registering a fixed IP address or by using a dedicated API key. The API endpoints remain the same; authorized requests simply receive a higher access tier.
| Access type | How it works | Typical use case |
|---|---|---|
| Registered IP address | The collaborator provides a fixed server IPv4 address or stable institutional server network range, and AGRP grants higher quota for requests from that address. If an IPv4 address is registered, requests must actually be sent through that IPv4 address; curl users can use -4. Personal computers on campus networks, dormitory networks, public Wi-Fi, mobile hotspots, or dynamic home broadband are generally not suitable for IP whitelist access. | Laboratory servers, institutional servers, or stable computing clusters. |
| Dedicated API key | The collaborator sends a key in the X-AGRP-API-Key request header. API keys should not be placed in the URL query string. | Teams without a fixed IP address, cross-institution workflows, or temporary authorized access. |
| Bulk package or manifest | For very large downloads, a curated package or file manifest may be more appropriate than sending many individual API requests. | Full dataset mirroring, long-term local analysis, or large-scale automated pipelines. |
Checking the IP address for whitelist applications
Before requesting IPv4 whitelist access, run the following command from the actual fixed server that will access AGRP. This command forces IPv4 and avoids accidentally submitting an IPv6 address returned by a browser request.
curl -4 -i "https://asteraceae.cgrpoee.top/api/whoami/"
Using an approved IPv4 whitelist
If AGRP has approved and registered your IPv4 address, make sure your automated requests are sent through that same IPv4 address. For curl, add -4 to high-throughput query or download commands when your network may otherwise prefer IPv6.
curl -4 -i "https://asteraceae.cgrpoee.top/api/genomics/kegg/?species=Aann&limit=1000"
curl -4 -L -o Aann.cds "https://asteraceae.cgrpoee.top/api/download/genome/?species=Aann&type=cds"
Using an API key
If the AGRP team provides an API key, include it in the HTTP request header named X-AGRP-API-Key. Do not include the key in a URL parameter, browser address bar, or shared link.
curl -H "X-AGRP-API-Key: agrp_your_api_key_here" \
"https://asteraceae.cgrpoee.top/api/genomics/kegg/?species=Aann&limit=1000"
curl -H "X-AGRP-API-Key: agrp_your_api_key_here" \
-L -o Aann.cds \
"https://asteraceae.cgrpoee.top/api/download/genome/?species=Aann&type=cds"
Recommended access pattern
- Check file availability before downloading large files.
- Use limit and offset for large tables instead of requesting all records at once.
- Avoid opening many parallel download connections from the same IP address.
- Use the X-AGRP-API-Key header only when an API key has been issued by the AGRP team.
- For full-dataset access, request a bulk package or manifest when possible.
9. Error Responses
When a request is invalid or the requested resource does not exist, the API returns a JSON error response with an appropriate HTTP status code.
| Status | Meaning | Common cause |
|---|---|---|
| 200 | OK | The request succeeded. |
| 400 | Bad Request | Missing required parameter, invalid file type, or unsafe parameter value. |
| 404 | Not Found | The requested file, species, dataset, or record does not exist. |
| 429 | Too Many Requests | The request exceeded the current IP-based rate limit or download concurrency limit. |
9.1 Missing required parameter
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/blocks/?limit=5"
{
"status": "error",
"message": "Missing required parameter: query_genome"
}
Correct request:
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/blocks/?query_genome=Aann&limit=5"
9.2 Invalid file type
curl -i "https://asteraceae.cgrpoee.top/api/download/genome/?species=Aann&type=abc"
{
"status": "error",
"message": "Invalid type parameter.",
"type": "abc",
"allowed_types": ["cds", "pep", "lens", "gff"]
}
9.3 File not found
curl -i "https://asteraceae.cgrpoee.top/api/download/genome/?species=NotExist&type=cds"
{
"status": "error",
"message": "File not found.",
"species": "NotExist",
"type": "cds",
"filename": "NotExist.cds"
}
9.4 Invalid species parameter
curl -i "https://asteraceae.cgrpoee.top/api/download/genome/?species=../../etc/passwd&type=cds"
{
"status": "error",
"message": "Invalid species parameter. Only letters, numbers, underscores, hyphens and dots are allowed.",
"species": "../../etc/passwd"
}
9.5 Too many requests
If the request frequency or the number of concurrent downloads is too high, the API may return 429 Too Many Requests.
{
"detail": "Request was throttled. Expected available in 42 seconds."
}
For concurrent download limits, the response may look like this:
{
"detail": "Too many concurrent download requests. Please wait for your current downloads to finish."
}
10. Usage Examples
The examples below show common ways to use the API. The tables above provide the full list of endpoints and supported parameters.
10.1 Check your detected IPv4 address
curl -4 -i "https://asteraceae.cgrpoee.top/api/whoami/"
10.2 Check whether the API is available
curl -i "https://asteraceae.cgrpoee.top/api/ping/"
10.3 List genome resources and download a file
# List species with available genome files
curl -i "https://asteraceae.cgrpoee.top/api/genomics/species/"
# Check whether a specific file exists
curl -i "https://asteraceae.cgrpoee.top/api/files/genome/?species=Aann&type=cds"
# Download the file
curl -L -o Aann.cds "https://asteraceae.cgrpoee.top/api/download/genome/?species=Aann&type=cds"
10.4 Query annotation records
curl -i "https://asteraceae.cgrpoee.top/api/genomics/kegg/?species=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genomics/interproscan/?species=Aann&database=Pfam&limit=5"
10.5 Query Geno-Syn records
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/blocks/?query_genome=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/block-details/?query_genome=Aann&limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/genosyn/hierarchical-genes/?reference=Hean&limit=5"
10.6 Query Multi-Omics records
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/pangenome/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/transcriptome/samples/?limit=5"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/transcriptome/sample/?filename=Dapi_white%20petal.json"
curl -i "https://asteraceae.cgrpoee.top/api/multiomics/metabolomics/plant/?limit=5"
11. Notes
- The API provides public read-only access to selected AGRP resources.
- Download endpoints return file streams only when the requested file exists. For scripts, check file availability before downloading large files.
- API requests may be rate-limited by IP address or authorized access level to maintain stable public service.
- Authorized collaborators may receive higher quotas through registered fixed server IPv4 addresses or the X-AGRP-API-Key request header.
- Use curl -4 -i "https://asteraceae.cgrpoee.top/api/whoami/" to check the IPv4 address detected by AGRP before requesting IPv4 whitelist access.
- If your approved whitelist address is IPv4, make sure later curl-based high-throughput requests also use -4 when the network may otherwise prefer IPv6.
- Use limit and offset when querying large tables or JSON resources. The default limit is 20. For public access, the maximum allowed limit is 100; authorized API-key users may have higher limit caps.
- URL-encode filenames or query values that contain spaces, for example Dapi_white%20petal.json.
- A successful response with an empty data list means the request was valid but no matching records were found.
- This documentation describes programmatic access to public resources and does not replace the normal website pages.