# Scan My Website API

### Overview

The **Scan My Website** feature utilizes AI to analyze the given website URL and extract valuable information such as:

* Brand description, name, and type
* Logo URLs and raw SVGs
* Website main colors and a comprehensive color palette

This feature provides insights that are valuable for branding and design purposes.

***

### Endpoint Information

**HTTP Method**: `GET`\
**URL**: `/api/v1/ScanMyWebsite`\
**Full URL**: `https://api.adcreative.ai/api/v1/ScanMyWebsite`

#### Authorization

This endpoint requires the following headers:

* `Authorization: Bearer <token>`
* `x-api-key: <your-api-key>`
* `x-api-secret: <your-api-secret>`

***

<table><thead><tr><th width="175">Header</th><th width="168">Description</th><th>Example</th></tr></thead><tbody><tr><td>Authorization</td><td>Bearer Token</td><td><code>Authorization: Bearer &#x3C;your-token></code></td></tr><tr><td>x-api-key</td><td>API Key</td><td><code>x-api-key: a1c3b5d7e9f6a8c4d2e9b3f7c5a9b1e4</code></td></tr><tr><td>x-api-secret</td><td>API Secret</td><td><code>x-api-secret: f5c6a7b8e9d4f1a3c7b6e8f3a9d5c2e7f8a6c1b9e7f3d5a4c6e9</code></td></tr></tbody></table>

***

### Query Parameters

<table><thead><tr><th width="240">Parameter</th><th width="102">Type</th><th width="106">Required</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>applicationId</code></td><td><code>Guid</code></td><td>Yes</td><td>The unique ID of the application.</td><td><code>4f7d8a9c-b5e6-4d3e-b7a9-d5c3e1b7a4f6</code></td></tr><tr><td><code>userId</code></td><td><code>Guid</code></td><td>Yes</td><td>The unique ID of the user.</td><td><code>2581c740-8e9d-4d63-96bc-5665bb9a646b</code></td></tr><tr><td><code>url</code></td><td><code>string</code></td><td>Yes</td><td>The website URL to scan.</td><td><code>https://fireflies.ai</code></td></tr><tr><td><code>includeLogoContent</code></td><td><code>bool</code></td><td>No</td><td>Whether to include the logo image bytes.</td><td><code>true</code></td></tr><tr><td><code>advanceMode</code></td><td><code>bool</code></td><td>No</td><td>Enables advanced mode for analysis.</td><td><code>false</code></td></tr></tbody></table>

***

### Example Requests

#### Curl Example

```bash
curl --location 'https://api.adcreative.ai/api/v1/ScanMyWebsite?applicationId=4f7d8a9c-b5e6-4d3e-b7a9-d5c3e1b7a4f6&userId=2581c740-8e9d-4d63-96bc-5665bb9a646b&url=https://fireflies.ai&includeLogoContent=true&advanceMode=false' \\
--header 'Accept: application/json' \\
--header 'Authorization: Bearer <token>' \\
--header 'x-api-key: <your-api-key>' \\
--header 'x-api-secret: <your-api-secret>'
```

#### HTTP Request Example

```http
GET /api/v1/ScanMyWebsite?applicationId=4f7d8a9c-b5e6-4d3e-b7a9-d5c3e1b7a4f6&userId=2581c740-8e9d-4d63-96bc-5665bb9a646b&url=https://fireflies.ai&includeLogoContent=true&advanceMode=false HTTP/1.1
Host: api.adcreative.ai
Authorization: Bearer <token>
x-api-key: <your-api-key>
x-api-secret: <your-api-secret>
Accept: application/json
```

***

### Example JSON Responses

#### Successful Response

**HTTP Status Code**: `200 OK`\
**Response Body**:

```json
{
    "brandLogos": {
        "logos": [
            "https://fireflies.ai/logo1.png",
            "https://fireflies.ai/logo2.png"
        ],
        "rawSvgIds": []
    },
    "firstLogoContent": "<base64-image-bytes>",
    "brandDescription": {
        "brandName": "Fireflies",
        "brandType": "Software as a Service (SaaS)",
        "brandDescription": "Fireflies.ai is an AI-powered notetaking platform."
    },
    "websiteColors": {
        "mainColors": ["#007bff", "#212529", "#6c757d"]
    },
    "colorsPalette": [
        ["#007bff", "#1a1f27"],
        ["#212529", "#ff6b6b"]
    ]
}
```

***

#### Authorization Error Response

**HTTP Status Code**: `401 Unauthorized`\
**Response Body**:

```json
{
    "errors": {
        "business:": [
            "Token is missing, invalid or ApplicationId is not found in the token."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more errors occurred.",
    "status": 401,
    "detail": null,
    "instance": null,
    "extensions": {
        "traceId": "00-d378b545461dcc848f91b9c6ea2e4775-26d09313c3eebb1a-00"
    }
}
```

***

#### Validation Error Response

**HTTP Status Code**: `400 Bad Request`\
**Response Body**:

```json
{
    "errors": {
        "engine: ScanMyWebsite": [
            "The provided URL is invalid or not an absolute URL."
        ],
        "business: ScanMyWebsite": [
            "Bad request error occurred while scanning the website for the Application: d5eabbb8-c0f6-4640-94fd-3566edad499f and User: 2581c740-8e9d-4d63-96bc-5665bb9a646b with the Url: auchan.fr"
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more errors occurred.",
    "status": 400,
    "detail": null,
    "instance": null,
    "extensions": {
        "traceId": "00-d142ce123ea6b6d9fa4b8ea74a1d7838-549229b6351e0557-00"
    }
}
```

***

#### Validation Error Response

**HTTP Status Code**: `400 Bad Request`\
**Response Body**:

```json
{
    "$id": "1",
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "errors": {
        "$id": "2",
        "userId": [
            "The value '2581c740-8e9d-4d63-96bc-5665bb9' is not valid."
        ]
    },
    "traceId": "00-c80817b5043d40808a7a26de5709b4de-37eb0d01b96e3768-00"
}
```

***

### Additional Details

#### Validation

* Ensure the `url` is a valid, absolute URL.
* Provide valid `applicationId` and `userId` values.
* Large websites may take longer to process, particularly in `advanceMode`.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.adcreative.ai/docs/features/scan-my-website-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
