← Back to Home

Query Parameters API

Prefill the comment form using URL query parameters

Parameters

targetUri

Target URL for the comment

?targetUri=https://example.com

channelId

Channel ID to select

?channelId=123

content

Comment content/text

?content=Great%20article!

metadata

Comma-separated format: key:value:type

?metadata=category:review:string,rating:5:uint256

Types: string, uint256, int256, address, bool, bytes, bytes32

Examples

Simple Comment

?targetUri=https://example.com&content=Great%20article!

With Metadata

?targetUri=https://example.com&metadata=category:review:string,rating:5:uint256

Complete Example

?targetUri=https://example.com&channelId=123&content=Amazing%20content&metadata=category:review:string

JavaScript

const params = new URLSearchParams({
  targetUri: "https://example.com",
  content: "Great article!",
  metadata: "category:review:string,rating:5:uint256",
});

const url = `https://share.ethcomments.xyz/?${params.toString()}`;

Build Query Params

Open the form in development mode to build and copy share URLs

Build Params