> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Context.dev: Contextdev Get Web Fonts

> Find the fonts a website uses, with families, fallbacks, and how often each appears. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Find the fonts a website uses, with families, fallbacks, and how often each appears.

> [!NOTE]
>
> Tool ID: `contextdev_get_web_fonts`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_get_web_fonts',
  {
    "directUrl": "https://example.com/resource",
    "domain": "example.com",
    "maxAgeMs": 7776000000
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute contextdev_get_web_fonts --input '{
  "directUrl": "https://example.com/resource",
  "domain": "example.com",
  "maxAgeMs": 7776000000
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "status": "example",
    "domain": "example.com",
    "fonts": [
      {
        "font": "example",
        "uses": [
          "example"
        ],
        "fallbacks": [
          "example"
        ],
        "num_elements": 123,
        "num_words": 123,
        "percent_words": 123,
        "percent_elements": 123
      }
    ],
    "code": 123
  }
}
```

Use `deepline describe contextdev_get_web_fonts --json` for the latest machine-readable contract.

## Input reference

Scrape font information from a website including font families, usage statistics, fallbacks, and element/word counts.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.directUrl` | `string` | No | — | A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., '[https://example.com/design-system](https://example.com/design-system)'). When provided, fonts are extracted from this exact URL. You must provide either 'domain' or 'directUrl', but not both. Format: `uri`. |
| `payload.domain` | `string` | No | — | Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both. Minimum length: 3. |
| `payload.maxAgeMs` | `integer` | No | `7776000000` | Maximum age in milliseconds for cached brand data before the API performs a hard refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) are clamped to 1 day. values above 1 year (31536000000 ms) are clamped to 1 year. |
| `payload.timeoutMS` | `integer` | No | — | Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). Minimum: 1000. Maximum: 300000. |
| `payload.tags` | `array` | No | — | Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters. Maximum items: 20. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Scrape font information from a website including font families, usage statistics, fallbacks, and element/word counts.",
    "properties": {
      "directUrl": {
        "type": "string",
        "description": "A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., 'https://example.com/design-system'). When provided, fonts are extracted from this exact URL. You must provide either 'domain' or 'directUrl', but not both.",
        "format": "uri"
      },
      "domain": {
        "type": "string",
        "description": "Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both.",
        "minLength": 3
      },
      "maxAgeMs": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Maximum age in milliseconds for cached brand data before the API performs a hard refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 year.",
        "default": 7776000000
      },
      "timeoutMS": {
        "type": "integer",
        "description": "Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).",
        "minimum": 1000,
        "maximum": 300000
      },
      "tags": {
        "type": "array",
        "description": "Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.",
        "maxItems": 20,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.status` | `string` | Yes | — | — |
| `result.data.domain` | `string` | Yes | — | — |
| `result.data.fonts` | `array` | Yes | — | — |
| `result.data.fonts[].font` | `string` | Yes | — | — |
| `result.data.fonts[].uses` | `array` | Yes | — | — |
| `result.data.fonts[].fallbacks` | `array` | Yes | — | — |
| `result.data.fonts[].num_elements` | `number` | Yes | — | — |
| `result.data.fonts[].num_words` | `number` | Yes | — | — |
| `result.data.fonts[].percent_words` | `number` | Yes | — | — |
| `result.data.fonts[].percent_elements` | `number` | Yes | — | — |
| `result.data.fontLinks` | `record` | No | — | — |
| `result.data.code` | `integer` | Yes | — | — |
| `result.data.key_metadata` | `object` | No | — | — |
| `result.meta` | `object` | No | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "fonts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "font": {
                  "type": "string"
                },
                "uses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "fallbacks": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "num_elements": {
                  "type": "number"
                },
                "num_words": {
                  "type": "number"
                },
                "percent_words": {
                  "type": "number"
                },
                "percent_elements": {
                  "type": "number"
                }
              },
              "required": [
                "font",
                "uses",
                "fallbacks",
                "num_elements",
                "num_words",
                "percent_words",
                "percent_elements"
              ],
              "additionalProperties": false
            }
          },
          "fontLinks": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "google",
                    "custom"
                  ]
                },
                "files": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "category": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "files"
              ],
              "additionalProperties": false
            }
          },
          "code": {
            "type": "integer"
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "domain",
          "fonts",
          "code"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.01` per pricing unit.

## Related documentation

* [Context.dev provider guide](https://deepline.com/docs/providers/contextdev/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.