Skip to main content
The JavaScript and TypeScript SDK supports current Node.js LTS releases. This example uses an ES module; the same SDK calls work in TypeScript.

Install the SDK

Set your API key

Get a secret API key from the dashboard. Set it in the terminal where you will run the example:
Keep the key in server-side code. Do not expose it in a browser or commit it to source control.

Scrape a webpage

Save this as scrape.mjs:
scrape.mjs
Run it from the same directory:
Save the same example as scrape.mts. Install tsx as a development dependency, then run it:

Check the result

The example prints the page content as Markdown. Look for the Example Domain heading; the remaining text and formatting may vary.
Expected heading
If you receive an error, check the key and request details in Troubleshooting. See the Markdown API reference for all parameters and response fields.

Retrieve brand data

Replace the request and final console.log with this lookup. It prints the matched company name.

Next steps

Scrape a webpage

Choose which page content to include.

Retrieve brand data

Look up profiles with other company identifiers.