# API - Early Access

#### Early Preview Access to Our API

We're thrilled to announce that our API is currently in early preview! This is a unique opportunity to be among the first to explore our new features, and it's completely free. We understand the importance of building a tool that meets your needs, and we're dedicated to making our API the best it can be.

{% hint style="info" %}
As we are in the alpha stage, please be aware that you might encounter some rough edges, and we're actively working on improvements. Your feedback is invaluable to us during this phase. Whether you have questions, suggestions, or just want to share your thoughts, we're all ears.
{% endhint %}

## Getting started with Monitoro API

Monitoro API is designed to extend your projects and automations with the ability to retrieve data from any website in your personal browser, with minimal scraping or even coding experience.&#x20;

To get started with an API token or to share your feedback, please don't hesitate to reach out to us at [**support@monitoro.co**](mailto:support@monitoro.co). Your input will be instrumental in shaping the future of our API, and we're excited to embark on this journey together. Let's create something amazing!

***

## Authentication

All Monitoro API endpoints use a Bearer token authentication. During the alpha phase you can request a token by contacting us at <support@monitoro.co>.

Once you get your API token from us, send an `Authorization` header with `Bearer mtat-abc123` with every request you make.

***

## Extract data from URL

*<https://api.monitoro.app/v1/monitors/{monitorId}/extract>*

**How does it work?** This method lets you extract or scrape data directly using your own browser. Using the data selection and automation from any of your monitors, this method will extract data and optionally run your monitor's automations with it.

First, open your monitor in [Monitoro](#https-api.monitoro.app-v1-monitors-monitorid-extract) and retrieve the monitorId from the address at the top. It is the long text after `https://monitoro.app/monitors/...`.

{% hint style="warning" %}
Make sure your browser is running and the extension is installed & logged in before calling this API method, since it is made to let you automate your browser. Extraction will fail immediately if you don't have the extension running and you will receive an error response.
{% endhint %}

You then have two options to call this method's endpoint:

#### Extract & Run automations

The `Extract data from URL` method extracts data and sends it to your automations if `noIngest` is `false` or not defined.

* This endpoint does not wait for the automations to run and returns data as soon as it is extracted.
* &#x20;You have access to the full array of apps supported by Monitoro.

Example payload:

```
{
    "url": "https://example.com"
}
```

#### Extract only

The `Extract data from URL` can also simply return data without running automations. Specify `noIngest` as `true` to achieve this.

* Make sure to respect your local laws and the terms of the website. Example payload:&#x20;

```
{
    "url": "https://example.com",
    "noIngest": true
}
```

In both cases the endpoint will return data it extracted, and any error encountered during the process.

**Error status codes**

This API can return responses with the status 200, 400, 404 and 500. Please look at the response block below, and click on the dropdown with "200" in it to see Error codes.

{% openapi src="<https://4133542631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnQWIBwmIWAqqWM90FfsX%2Fuploads%2Fy5aed03vXHiHN0opdBs7%2Fopenapi.yml?alt=media&token=b3060100-2af9-4c05-9a35-b7afc7c39fd8>" path="<https://api.monitoro.app/v1/monitors/{monitorId}/extract>" method="post" %}
[openapi.yml](https://4133542631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnQWIBwmIWAqqWM90FfsX%2Fuploads%2Fy5aed03vXHiHN0opdBs7%2Fopenapi.yml?alt=media\&token=b3060100-2af9-4c05-9a35-b7afc7c39fd8)
{% endopenapi %}

***

## Need help?

{% content-ref url="../resources/common-questions-faq" %}
[common-questions-faq](https://docs.monitoro.co/resources/common-questions-faq)
{% endcontent-ref %}

{% content-ref url="../resources/troubleshooting" %}
[troubleshooting](https://docs.monitoro.co/resources/troubleshooting)
{% endcontent-ref %}

{% content-ref url="../resources/support" %}
[support](https://docs.monitoro.co/resources/support)
{% endcontent-ref %}
