{
  "openapi": "3.1.0",
  "info": {
    "title": "Sharelint API",
    "version": "1.0.0",
    "description": "Free link checker: see how a URL previews on WhatsApp, Facebook, X, LinkedIn and 8 more apps, whether ChatGPT, Claude and Perplexity can read it, and whether it opens your iOS or Android app."
  },
  "servers": [
    {
      "url": "https://sharelint.com"
    }
  ],
  "paths": {
    "/api/preview": {
      "get": {
        "operationId": "checkLinkPreview",
        "summary": "Check how a URL renders as a link preview on every platform, and whether AI tools can read it",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Public http(s) URL to check. The scheme is optional."
          },
          {
            "name": "crawler",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "facebook",
                "whatsapp",
                "twitter",
                "telegram",
                "linkedin",
                "discord",
                "slack",
                "imessage",
                "browser"
              ],
              "default": "facebook"
            },
            "description": "User-Agent to fetch the page with."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "md"
              ],
              "default": "json"
            },
            "description": "md returns a Markdown report."
          }
        ],
        "responses": {
          "200": {
            "description": "Report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "pageIssues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "level": {
                            "type": "string",
                            "enum": [
                              "error",
                              "warn",
                              "info"
                            ]
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "level",
                          "message"
                        ]
                      }
                    },
                    "platforms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string"
                              },
                              "surface": {
                                "type": "string"
                              },
                              "confidence": {
                                "type": "string"
                              }
                            }
                          },
                          "preview": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              },
                              "layout": {
                                "type": "string",
                                "enum": [
                                  "large",
                                  "small",
                                  "none"
                                ]
                              },
                              "image": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  }
                                }
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "level": {
                                      "type": "string",
                                      "enum": [
                                        "error",
                                        "warn",
                                        "info"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "level",
                                    "message"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "ai": {
                      "type": "object",
                      "description": "AI visibility: whether AI crawlers and assistants can reach the page, and what text they read.",
                      "properties": {
                        "score": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "level": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warn",
                                  "info"
                                ]
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "level",
                              "message"
                            ]
                          }
                        },
                        "bots": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "bot": {
                                "type": "object",
                                "properties": {
                                  "token": {
                                    "type": "string"
                                  },
                                  "owner": {
                                    "type": "string"
                                  },
                                  "product": {
                                    "type": "string"
                                  },
                                  "purpose": {
                                    "type": "string",
                                    "enum": [
                                      "search",
                                      "user",
                                      "training"
                                    ]
                                  }
                                }
                              },
                              "robots": {
                                "type": "object",
                                "properties": {
                                  "access": {
                                    "type": "string",
                                    "enum": [
                                      "allowed",
                                      "blocked",
                                      "unknown"
                                    ]
                                  },
                                  "rule": {
                                    "type": "string"
                                  }
                                }
                              },
                              "fetch": {
                                "type": "object",
                                "properties": {
                                  "access": {
                                    "type": "string",
                                    "enum": [
                                      "allowed",
                                      "blocked",
                                      "unknown"
                                    ]
                                  },
                                  "status": {
                                    "type": "integer"
                                  },
                                  "detail": {
                                    "type": "string"
                                  }
                                }
                              },
                              "access": {
                                "type": "string",
                                "enum": [
                                  "allowed",
                                  "blocked",
                                  "unknown"
                                ]
                              }
                            }
                          }
                        },
                        "llmsTxt": {
                          "type": "object",
                          "properties": {
                            "found": {
                              "type": "boolean"
                            },
                            "valid": {
                              "type": "boolean"
                            },
                            "url": {
                              "type": "string"
                            },
                            "links": {
                              "type": "integer"
                            }
                          }
                        },
                        "content": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "description": "Markdown-like text from the raw HTML, capped at 6000 characters."
                            },
                            "words": {
                              "type": "integer"
                            },
                            "jsonLdTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "apps": {
                      "type": "object",
                      "description": "App links: whether the URL opens the site’s iOS or Android app. score is null when the site has no app.",
                      "properties": {
                        "score": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100
                        },
                        "hasApp": {
                          "type": "boolean"
                        },
                        "host": {
                          "type": "string"
                        },
                        "ios": {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "ok",
                                "problem",
                                "none"
                              ]
                            },
                            "fileUrl": {
                              "type": "string"
                            },
                            "appIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pathMatch": {
                              "type": "object",
                              "properties": {
                                "matches": {
                                  "type": "boolean"
                                },
                                "appId": {
                                  "type": "string"
                                },
                                "rule": {
                                  "type": "string"
                                }
                              }
                            },
                            "cdn": {
                              "type": "string",
                              "enum": [
                                "same",
                                "different",
                                "missing",
                                "unknown"
                              ],
                              "description": "Apple’s CDN copy compared with the site’s file."
                            }
                          }
                        },
                        "android": {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "ok",
                                "problem",
                                "none"
                              ]
                            },
                            "fileUrl": {
                              "type": "string"
                            },
                            "packages": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "fingerprints": {
                                    "type": "integer"
                                  }
                                }
                              }
                            },
                            "google": {
                              "type": "string",
                              "enum": [
                                "verified",
                                "none",
                                "unknown"
                              ],
                              "description": "What Google’s Digital Asset Links service reports."
                            }
                          }
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "level": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warn",
                                  "info"
                                ]
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "level",
                              "message"
                            ]
                          }
                        }
                      }
                    },
                    "fixes": {
                      "type": "object",
                      "description": "What to change, most important first. Issues that share a cause are grouped into one fix, with copy-ready code filled from the page.",
                      "properties": {
                        "share": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warn",
                                  "info"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "why": {
                                "type": "string"
                              },
                              "steps": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "code": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                }
                              },
                              "apps": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Apps whose preview this fix changes."
                              },
                              "resolves": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Issue messages this fix resolves."
                              }
                            }
                          }
                        },
                        "ai": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warn",
                                  "info"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "why": {
                                "type": "string"
                              },
                              "steps": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "code": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                }
                              },
                              "apps": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Apps whose preview this fix changes."
                              },
                              "resolves": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Issue messages this fix resolves."
                              }
                            }
                          }
                        },
                        "apps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "error",
                                  "warn",
                                  "info"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "why": {
                                "type": "string"
                              },
                              "steps": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "code": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                }
                              },
                              "apps": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Apps whose preview this fix changes."
                              },
                              "resolves": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Issue messages this fix resolves."
                              }
                            }
                          }
                        }
                      }
                    },
                    "result": {
                      "type": "object",
                      "description": "Raw fetch result: status, redirects, timing, meta tags, image probes and AI signals."
                    }
                  }
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or private URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The target could not be fetched (unknown host, timeout, SSL error or too many redirects)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string",
                      "description": "Raw cause, for debugging."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: about 10 requests per 10 seconds per IP address. Wait a few seconds, then retry."
          }
        }
      }
    }
  }
}