GET
/motif
Searches the canonical sequence of every TF for a protein pattern and returns each hit with its position and the merged domains it overlaps, or one row per TF with per=tf. Patterns are written in PROSITE syntax (C-x(2,4)-C-x(12)-H-x(3,5)-H, with x for any residue, [ST] for either, {P} for anything but P, < and > for the protein ends) or as a regular expression (C.{2,4}C.{12}H.{3,5}H). The JSON reply also gives the regular expression that was run and how many TFs matched (tfs).
Parameters
Required
| Name | Type | Description | Default | Example |
|---|---|---|---|---|
pattern | String | The motif, in PROSITE or regular-expression syntax. | - | C-x(2,4)-C-x(12)-H-x(3,5)-H |
Optional
| Name | Type | Description | Default | Example |
|---|---|---|---|---|
syntax | Enum | auto reads PROSITE when the pattern has dashes or x(n) elements, a regular expression otherwise. autoprositeregex | auto | prosite |
per | Enum | match: one row per hit; tf: one row per TF with its number of hits and their positions. matchtf | match | tf |
gene | String | Search only these TFs (comma-separated symbols). | - | ZNF10 |
uniprot | String | Search only these UniProt accessions. | - | P21506 |
tf_family | String | Search only TFs of these families. | - | C2H2 ZF |
within_domain | Boolean | Keep only hits that overlap a merged domain. | false | true |
domain.type | Enum | Keep only hits that overlap a domain of this class. EDDBD | - | ED |
domain.subtype | Enum | Keep only hits that overlap a domain with this activity. activationrepressionbifunctionaldna | - | repression |
format | Enum | Serialization of the response body. TSV and NDJSON hold one page of rows; the X-Total-Count header gives the number of matches in all, so read further pages with page. jsontsvndjson | json | tsv |
fields | String | Comma-separated subset of fields to keep in each row; an unknown field gets a 400. | - | symbol,start,end,match |
sort | String | Comma-separated fields to order by; prefix a field with '-' for descending. | - | symbol |
page | Int | 1-based page number. | 1 | 2 |
page_size | Int | Rows per page (maximum 1000). | 100 | 1000 |
Hits do not overlap each other. To keep every search fast, a pattern may span at most 200 residues and may not use groups, alternation (|), * or +; use bounded repeats such as x(2,4) or .{2,4}. A search that matches more than 20,000 times gets a 400 asking for a narrower pattern or filters. With curl, write [ and ] as %5B and %5D (or pass -g), because curl reads brackets as a range.
Example requests
C2H2 zinc fingers in ZNF10
curl 'https://tfregdb.com/api/v2.0/motif?pattern=C-x(2,4)-C-x(12)-H-x(3,5)-H&gene=ZNF10' TFs with C2H2 fingers, one row per TF (TSV)
curl 'https://tfregdb.com/api/v2.0/motif?pattern=C-x(2,4)-C-x(12)-H-x(3,5)-H&per=tf&format=tsv&page_size=1000' CDK phosphorylation sites (S/T-P-x-K/R) inside activation domains
curl 'https://tfregdb.com/api/v2.0/motif?pattern=%5BST%5D-P-x-%5BKR%5D&domain.subtype=activation'