# List platform URL patterns

Source: https://docs.musicnerd.net/api-reference/artist-links/platform-regexes

List platform URL patterns

## GET /api/platformRegexes

Full OpenAPI specification: https://docs.musicnerd.net/spec/artist-links.json

## Authentication

This operation's specification permits a request without authentication.

[Authentication guide](https://docs.musicnerd.net/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Music Nerd API: artist links",
    "version": "1.0.0",
    "description": "Writing, ordering, checking and reviewing the platform links on an artist's profile."
  },
  "servers": [
    {
      "url": "https://musicnerd-api.vercel.app",
      "description": "Production"
    },
    {
      "url": "https://musicnerd-api-staging.vercel.app",
      "description": "Staging (staging database)"
    }
  ],
  "paths": {
    "/api/platformRegexes": {
      "get": {
        "summary": "List platform URL patterns",
        "operationId": "getPlatformRegexes",
        "security": [],
        "description": "Every supported platform's URL pattern except `ens` and `wallets`, so a client can recognise a link before submitting it. Catalog, Foundation and sound.xyz are left out, as everywhere in this API. No credentials.",
        "responses": {
          "200": {
            "description": "The patterns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "regexes"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "regexes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "siteName",
                          "regex"
                        ],
                        "properties": {
                          "siteName": {
                            "type": "string"
                          },
                          "regex": {
                            "type": "string",
                            "description": "A JavaScript regular expression source."
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "ok",
                  "regexes": [
                    {
                      "siteName": "instagram",
                      "regex": "^https?://(www\\.)?instagram\\.com/([^/?#]+)"
                    },
                    {
                      "siteName": "soundcloud",
                      "regex": "^https://(www\\.)?soundcloud\\.com/([^/]+)(?:/.*)?$"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The table could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Could not load platform patterns"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```
