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

# The go-to web data API

> Scrape websites into Markdown, crawl linked pages, and extract JSON for AI agents and applications.

Context.dev turns websites into data for AI agents and applications. Scrape a page into Markdown, crawl linked pages, or extract fields into JSON shaped by your schema.

When your workflow needs company context, retrieve brand profiles with logos, colors, descriptions, and social links through the same API.

<Card title="Quickstart" icon="terminal" href="/quickstart">
  Get an API key and make your first request with cURL or your preferred SDK.
</Card>

Working with a coding agent? Follow the [agent quickstart](/agent-quickstart).

## Try a request

[Create an account](https://context.dev/signup), then copy your key from the [dashboard](https://context.dev/dashboard). Set it in the shell where you'll run the example:

```bash theme={null}
export CONTEXT_DEV_API_KEY="ctxt_secret_..."
```

Choose an API, then your language.

<Tabs>
  <Tab title="Markdown">
    Turn a webpage into Markdown. This request costs 1 credit.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --get https://api.context.dev/v1/web/scrape/markdown \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --data-urlencode "url=https://example.com" \
        --data-urlencode "useMainContentOnly=true"
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({ apiKey: process.env.CONTEXT_DEV_API_KEY });

      const response = await client.web.webScrapeMd({
        url: "https://example.com",
        useMainContentOnly: true,
      });

      console.log(response.markdown);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      response = client.web.web_scrape_md(
          url="https://example.com",
          use_main_content_only=True,
      )

      print(response.markdown)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      response = client.web.web_scrape_md(
        url: "https://example.com",
        use_main_content_only: true,
      )

      puts response.markdown
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
          "github.com/context-dot-dev/context-go-sdk/v2/packages/param"
      )

      func main() {
          client := contextdev.NewClient(option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")))
          response, err := client.Web.WebScrapeMd(context.Background(), contextdev.WebWebScrapeMdParams{
              URL:                "https://example.com",
              UseMainContentOnly: param.NewOpt(true),
          })
          if err != nil {
              panic(err)
          }
          fmt.Println(response.Markdown)
      }
      ```

      ```php PHP theme={null}
      <?php

      require __DIR__.'/vendor/autoload.php';

      $client = new ContextDev\Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $response = $client->web->webScrapeMd(
          url: "https://example.com",
          useMainContentOnly: true,
      );

      echo $response->markdown, PHP_EOL;
      ```
    </CodeGroup>

    Read page text from `markdown`. The [Markdown guide](/guides/scrape-websites-to-markdown) covers content filters and freshness.
  </Tab>

  <Tab title="Structured data">
    Extract a company fact into your JSON Schema, using up to 5 relevant pages. The 10-credit charge covers the full extraction, not each page.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.context.dev/v1/web/extract \
        --request POST \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --header "Content-Type: application/json" \
        --data '{
          "url": "https://stripe.com",
          "schema": {
            "type": "object",
            "properties": {
              "founded_year": {
                "type": ["integer", "null"],
                "description": "The year the company says it was founded. Return null if not stated."
              }
            },
            "required": ["founded_year"],
            "additionalProperties": false
          },
          "maxPages": 5,
          "factCheck": true
        }'
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({ apiKey: process.env.CONTEXT_DEV_API_KEY });

      const response = await client.web.extract({
        url: "https://stripe.com",
        schema: {
          type: "object",
          properties: {
            founded_year: {
              type: ["integer", "null"],
              description:
                "The year the company says it was founded. Return null if not stated.",
            },
          },
          required: ["founded_year"],
          additionalProperties: false,
        },
        maxPages: 5,
        factCheck: true,
      });

      console.log(response.data, response.urls_analyzed);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      response = client.web.extract(
          url="https://stripe.com",
          schema={
            "type": "object",
            "properties": {
              "founded_year": {
                "type": ["integer", "null"],
                "description": "The year the company says it was founded. Return null if not stated.",
              },
            },
            "required": ["founded_year"],
            "additionalProperties": False,
          },
          max_pages=5,
          fact_check=True,
      )

      print(response.data, response.urls_analyzed)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      response = client.web.extract(
        url: "https://stripe.com",
        schema: {
          "type" => "object",
          "properties" => {
            "founded_year" => {
              "type" => ["integer", "null"],
              "description" => "The year the company says it was founded. Return null if not stated.",
            },
          },
          "required" => ["founded_year"],
          "additionalProperties" => false,
        },
        max_pages: 5,
        fact_check: true,
      )

      pp response.data, response.urls_analyzed
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
          "github.com/context-dot-dev/context-go-sdk/v2/packages/param"
      )

      func main() {
          client := contextdev.NewClient(option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")))
          response, err := client.Web.Extract(context.Background(), contextdev.WebExtractParams{
              URL: "https://stripe.com",
              Schema: map[string]any{
                  "type": "object",
                  "properties": map[string]any{
                      "founded_year": map[string]any{
                          "type":        []string{"integer", "null"},
                          "description": "The year the company says it was founded. Return null if not stated.",
                      },
                  },
                  "required":             []string{"founded_year"},
                  "additionalProperties": false,
              },
              MaxPages:  param.NewOpt(int64(5)),
              FactCheck: param.NewOpt(true),
          })
          if err != nil {
              panic(err)
          }
          fmt.Println(response.Data, response.URLsAnalyzed)
      }
      ```

      ```php PHP theme={null}
      <?php

      require __DIR__.'/vendor/autoload.php';

      $client = new ContextDev\Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $response = $client->web->extract(
          url: "https://stripe.com",
          schema: [
            "type" => "object",
            "properties" => [
              "founded_year" => [
                "type" => ["integer", "null"],
                "description" => "The year the company says it was founded. Return null if not stated.",
              ],
            ],
            "required" => ["founded_year"],
            "additionalProperties" => false,
          ],
          maxPages: 5,
          factCheck: true,
      );

      print_r([$response->data, $response->urlsAnalyzed]);
      ```
    </CodeGroup>

    Read the extracted object from `data` and its source pages from `urls_analyzed`. See the [extraction guide](/guides/extract-structured-data-from-websites) for schema design and fact checks.
  </Tab>

  <Tab title="Images">
    Find image sources referenced by a webpage. This request costs 1 credit.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --get https://api.context.dev/v1/web/scrape/images \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --data-urlencode "url=https://stripe.com"
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({
        apiKey: process.env.CONTEXT_DEV_API_KEY,
      });

      const page = await client.web.webScrapeImages({
        url: "https://stripe.com",
      });

      console.log(page.images);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      page = client.web.web_scrape_images(url="https://stripe.com")
      print(page.images)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      page = client.web.web_scrape_images(url: "https://stripe.com")
      puts page.images
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
      )

      func main() {
          client := contextdev.NewClient(
              option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")),
          )

          page, err := client.Web.WebScrapeImages(context.Background(), contextdev.WebWebScrapeImagesParams{
              URL: "https://stripe.com",
          })
          if err != nil {
              panic(err)
          }

          fmt.Println(page.Images)
      }
      ```

      ```php PHP theme={null}
      <?php

      require __DIR__.'/vendor/autoload.php';

      use ContextDev\Client;

      $client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $page = $client->web->webScrapeImages(url: 'https://stripe.com');
      print_r($page->images);
      ```
    </CodeGroup>

    The `images` array contains the discovered assets; it may be empty. See the [image guide](/guides/extract-page-images) for dimensions, hosted copies, and visual classification.
  </Tab>

  <Tab title="Sitemap">
    List up to 50 customer-page URLs from Stripe's public sitemaps without rendering each page. This request costs 1 credit.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --get https://api.context.dev/v1/web/scrape/sitemap \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --data-urlencode "domain=stripe.com" \
        --data-urlencode "maxLinks=50" \
        --data-urlencode "urlRegex=/customers/"
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({
        apiKey: process.env.CONTEXT_DEV_API_KEY,
      });

      const sitemap = await client.web.webScrapeSitemap({
        domain: "stripe.com",
        maxLinks: 50,
        urlRegex: "/customers/",
      });

      console.log(sitemap.urls);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      sitemap = client.web.web_scrape_sitemap(
          domain="stripe.com",
          max_links=50,
          url_regex="/customers/",
      )

      print(sitemap.urls)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      sitemap = client.web.web_scrape_sitemap(
        domain: "stripe.com",
        max_links: 50,
        url_regex: "/customers/",
      )

      puts sitemap.urls
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
          "github.com/context-dot-dev/context-go-sdk/v2/packages/param"
      )

      func main() {
          client := contextdev.NewClient(
              option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")),
          )

          sitemap, err := client.Web.WebScrapeSitemap(context.Background(), contextdev.WebWebScrapeSitemapParams{
              Domain: "stripe.com",
              MaxLinks: param.NewOpt[int64](50),
              URLRegex: param.NewOpt("/customers/"),
          })
          if err != nil {
              panic(err)
          }

          fmt.Println(sitemap.URLs)
      }
      ```

      ```php PHP theme={null}
      <?php

      require __DIR__.'/vendor/autoload.php';

      use ContextDev\Client;

      $client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $sitemap = $client->web->webScrapeSitemap(
          domain: 'stripe.com',
          maxLinks: 50,
          urlRegex: '/customers/',
      );

      print_r($sitemap->urls);
      ```
    </CodeGroup>

    Read the URL list from `urls` and check `meta` for sitemap fetches and errors. The [sitemap guide](/guides/discover-website-urls) covers filtering and discovery limits.
  </Tab>

  <Tab title="Brand">
    Look up a company profile with logos, colors, descriptions, and social links. A successful lookup costs 10 credits.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.context.dev/v1/brand/retrieve \
        --request POST \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --header "Content-Type: application/json" \
        --data '{
          "type": "by_domain",
          "domain": "stripe.com"
        }'
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({ apiKey: process.env.CONTEXT_DEV_API_KEY });

      const response = await client.brand.retrieve({
        type: "by_domain",
        domain: "stripe.com",
      });

      console.log(response.brand?.title);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      response = client.brand.retrieve(
          type="by_domain",
          domain="stripe.com",
      )

      print(response.brand.title if response.brand else None)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      response = client.brand.retrieve(
        body: {
          "type" => "by_domain",
          "domain" => "stripe.com",
        }
      )

      puts response.brand&.title
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
      )

      func main() {
          client := contextdev.NewClient(option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")))
          response, err := client.Brand.Get(context.Background(), contextdev.BrandGetParams{
              OfByDomain: &contextdev.BrandGetParamsBodyByDomain{
                  Domain: "stripe.com",
              },
          })
          if err != nil {
              panic(err)
          }
          fmt.Println(response.Brand.Title)
      }
      ```

      ```php PHP theme={null}
      <?php

      require __DIR__.'/vendor/autoload.php';

      $client = new ContextDev\Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      // Use the SDK's low-level request: its generated Brand helper cannot express this lookup.
      $response = $client->request(
          method: 'post',
          path: 'brand/retrieve',
          body: [
            "type" => "by_domain",
            "domain" => "stripe.com",
          ],
      );
      $data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR);
      echo $data['brand']['title'] ?? 'No match', PHP_EOL;
      ```
    </CodeGroup>

    The matched company is in `brand`. PHP SDK 2.14.0 uses its low-level request method for this lookup. See the [brand guide](/guides/get-brand-data) for lookup options and result fields.
  </Tab>

  <Tab title="Styleguide">
    Extract observed colors, typography, and component styles. This request costs 10 credits.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --get https://api.context.dev/v1/web/styleguide \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --data-urlencode "domain=stripe.com" \
        --data-urlencode "colorScheme=light"
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({
        apiKey: process.env.CONTEXT_DEV_API_KEY,
      });

      const response = await client.web.extractStyleguide({
        domain: "stripe.com",
        colorScheme: "light",
      });

      console.log(response.styleguide?.colors);
      console.log(response.styleguide?.typography.headings.h1);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      response = client.web.extract_styleguide(
          domain="stripe.com",
          color_scheme="light",
      )

      print(response.styleguide.colors)
      print(response.styleguide.typography.headings.h1)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(
        api_key: ENV.fetch("CONTEXT_DEV_API_KEY")
      )

      response = client.web.extract_styleguide(
        domain: "stripe.com",
        color_scheme: :light
      )

      puts response.styleguide.colors.inspect
      puts response.styleguide.typography.headings.h1.inspect
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
      )

      func main() {
          client := contextdev.NewClient(
              option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")),
          )

          response, err := client.Web.ExtractStyleguide(
              context.Background(),
              contextdev.WebExtractStyleguideParams{
                  Domain: contextdev.String("stripe.com"),
                  ColorScheme: contextdev.WebExtractStyleguideParamsColorSchemeLight,
              },
          )
          if err != nil {
              panic(err)
          }

          fmt.Println(response.Styleguide.Colors)
          fmt.Println(response.Styleguide.Typography.Headings.H1)
      }
      ```

      ```php PHP theme={null}
      <?php

      require __DIR__.'/vendor/autoload.php';

      use ContextDev\Client;

      $client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $response = $client->web->extractStyleguide(
          domain: 'stripe.com',
          colorScheme: 'light',
      );

      var_dump($response->styleguide->colors);
      var_dump($response->styleguide->typography->headings->h1);
      ```
    </CodeGroup>

    Inspect `styleguide.colors` and `styleguide.typography`. These are observations of the rendered page, not an official design-system specification. See the [styleguide guide](/guides/extract-design-system-from-website) for the full result.
  </Tab>

  <Tab title="Batches">
    Submit two URLs for background scraping. Each successful page costs 1 credit.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.context.dev/v1/batch/submit \
        --request POST \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --header "Content-Type: application/json" \
        --data '{
        "input": {
          "mode": "scrape",
          "data": {
            "format": "markdown",
            "urls": [
              {
                "url": "https://docs.context.dev/introduction"
              },
              {
                "url": "https://docs.context.dev/quickstart"
              }
            ]
          }
        }
      }'
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({ apiKey: process.env.CONTEXT_DEV_API_KEY });

      const response = await client.batch.submit({
        input: {
          mode: "scrape",
          data: {
            format: "markdown",
            urls: [
              {
                url: "https://docs.context.dev/introduction",
              },
              {
                url: "https://docs.context.dev/quickstart",
              },
            ],
          },
        },
      });
      console.log(response.id);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      response = client.batch.submit(
          input={
              "mode": "scrape",
              "data": {
                  "format": "markdown",
                  "urls": [
                      {
                          "url": "https://docs.context.dev/introduction",
                      },
                      {
                          "url": "https://docs.context.dev/quickstart",
                      },
                  ],
              },
          },
      )
      print(response.id)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      response = client.batch.submit(
        input: {
          mode: "scrape",
          data: {
            format: "markdown",
            urls: [
              {
                url: "https://docs.context.dev/introduction",
              },
              {
                url: "https://docs.context.dev/quickstart",
              },
            ],
          },
        },
      )
      puts response.id
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
      )

      func main() {
          client := contextdev.NewClient(option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")))

          response, err := client.Batch.Submit(context.Background(), contextdev.BatchSubmitParams{
              Input: contextdev.BatchSubmitParamsInputUnion{
                  OfScrape: &contextdev.BatchSubmitParamsInputScrape{
                      Mode: "scrape",
                      Data: contextdev.BatchSubmitParamsInputScrapeDataUnion{
                          OfMarkdown: &contextdev.BatchSubmitParamsInputScrapeDataMarkdown{
                              Format: "markdown",
                              URLs: []contextdev.BatchSubmitParamsInputScrapeDataMarkdownURL{
                                  contextdev.BatchSubmitParamsInputScrapeDataMarkdownURL{
                                      URL: "https://docs.context.dev/introduction",
                                  },
                                  contextdev.BatchSubmitParamsInputScrapeDataMarkdownURL{
                                      URL: "https://docs.context.dev/quickstart",
                                  },
                              },
                          },
                      },
                  },
              },
          })
          if err != nil {
              panic(err)
          }
          fmt.Println(response.ID)
      }
      ```

      ```php PHP theme={null}
      <?php
      require __DIR__.'/vendor/autoload.php';

      use ContextDev\Client;

      $client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $response = $client->batch->submit(
          input: [
              "mode" => "scrape",
              "data" => [
                  "format" => "markdown",
                  "urls" => [
                      [
                          "url" => "https://docs.context.dev/introduction",
                      ],
                      [
                          "url" => "https://docs.context.dev/quickstart",
                      ],
                  ],
              ],
          ],
      );
      echo $response->id, PHP_EOL;
      ```
    </CodeGroup>

    The response contains a job `id`, not completed page content. Save it, then [poll for completion and read the results](/guides/scrape-websites-in-batches#poll-for-completion).
  </Tab>

  <Tab title="Monitors">
    Check a pricing page for text changes every day. No webhook is required.

    <Warning>
      This creates an ongoing monitor. Its initial and scheduled runs consume credits. [Pause](/guides/monitor-website-changes#run-pause-or-update-a-monitor) or [delete](/api-reference/monitors/delete) it when you finish testing.
    </Warning>

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.context.dev/v1/monitors \
        --request POST \
        --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
        --header "Content-Type: application/json" \
        --data '{
        "name": "Pricing changes",
        "target": {
          "type": "page",
          "url": "https://stripe.com/pricing",
          "normalize_whitespace": true
        },
        "change_detection": {
          "type": "exact"
        },
        "schedule": {
          "type": "interval",
          "frequency": 1,
          "unit": "days"
        }
      }'
      ```

      ```typescript TypeScript theme={null}
      import ContextDev from "context.dev";

      const client = new ContextDev({ apiKey: process.env.CONTEXT_DEV_API_KEY });

      const response = await client.monitors.create({
        name: "Pricing changes",
        target: {
          type: "page",
          url: "https://stripe.com/pricing",
          normalize_whitespace: true,
        },
        change_detection: {
          type: "exact",
        },
        schedule: {
          type: "interval",
          frequency: 1,
          unit: "days",
        },
      });
      console.log(response.id, response.initial_run_id);
      ```

      ```python Python theme={null}
      import os
      from context.dev import ContextDev

      client = ContextDev(api_key=os.environ["CONTEXT_DEV_API_KEY"])

      response = client.monitors.create(
          name="Pricing changes",
          target={
              "type": "page",
              "url": "https://stripe.com/pricing",
              "normalize_whitespace": True,
          },
          change_detection={
              "type": "exact",
          },
          schedule={
              "type": "interval",
              "frequency": 1,
              "unit": "days",
          },
      )
      print(response.id, response.initial_run_id)
      ```

      ```ruby Ruby theme={null}
      require "cgi/core"
      require "context_dev"

      client = ContextDev::Client.new(api_key: ENV.fetch("CONTEXT_DEV_API_KEY"))

      response = client.monitors.create(
        name: "Pricing changes",
        target: {
          type: "page",
          url: "https://stripe.com/pricing",
          normalize_whitespace: true,
        },
        change_detection: {
          type: "exact",
        },
        schedule: {
          type: "interval",
          frequency: 1,
          unit: "days",
        },
      )
      puts response.id, response.initial_run_id
      ```

      ```go Go theme={null}
      package main

      import (
          "context"
          "fmt"
          "os"

          contextdev "github.com/context-dot-dev/context-go-sdk/v2"
          "github.com/context-dot-dev/context-go-sdk/v2/option"
      )

      func main() {
          client := contextdev.NewClient(option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")))

          response, err := client.Monitors.New(context.Background(), contextdev.MonitorNewParams{
              Name: "Pricing changes",
              Target: contextdev.MonitorNewParamsTargetUnion{
                  OfPage: &contextdev.MonitorNewParamsTargetPage{
                      Type:                "page",
                      URL:                 "https://stripe.com/pricing",
                      NormalizeWhitespace: contextdev.Bool(true),
                  },
              },
              ChangeDetection: contextdev.MonitorNewParamsChangeDetectionUnion{
                  OfExact: &contextdev.MonitorNewParamsChangeDetectionExact{
                      Type: "exact",
                  },
              },
              Schedule: contextdev.MonitorNewParamsSchedule{
                  Type:      "interval",
                  Frequency: 1,
                  Unit:      "days",
              },
          })
          if err != nil {
              panic(err)
          }
          fmt.Println(response.ID, response.InitialRunID)
      }
      ```

      ```php PHP theme={null}
      <?php
      require __DIR__.'/vendor/autoload.php';

      use ContextDev\Client;

      $client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY'));

      $response = $client->monitors->create(
          name: "Pricing changes",
          target: [
              "type" => "page",
              "url" => "https://stripe.com/pricing",
              "normalizeWhitespace" => true,
          ],
          changeDetection: [
              "type" => "exact",
          ],
          schedule: [
              "type" => "interval",
              "frequency" => 1,
              "unit" => "days",
          ],
      );
      echo $response->id, " ", $response->initialRunID, PHP_EOL;
      ```
    </CodeGroup>

    Save `id` and `initial_run_id`. The first run establishes a baseline. Use the [monitoring guide](/guides/monitor-website-changes#poll-runs-and-changes) to read later runs and changes.
  </Tab>
</Tabs>

The [quickstart](/quickstart) covers SDK installation, run commands, and how to check each result.

## Explore the APIs

### Web data APIs

<CardGroup cols={3}>
  <Card title="Scrape Markdown" icon="file-lines" href="/api-reference/web-scraping/markdown">
    Turn a webpage into Markdown for agents, search, and retrieval.
  </Card>

  <Card title="Scrape HTML" icon="code" href="/api-reference/web-scraping/html">
    Retrieve page HTML to parse and process yourself.
  </Card>

  <Card title="Structured extraction" icon="brackets-curly" href="/api-reference/web-extraction/extract">
    Combine fields from relevant pages into one object matching your JSON Schema.
  </Card>

  <Card title="Crawl" icon="globe" href="/api-reference/web-scraping/crawl">
    Follow website links and return each page as Markdown.
  </Card>

  <Card title="Web search" icon="magnifying-glass" href="/api-reference/web-scraping/search">
    Search the web and optionally scrape result pages in the same call.
  </Card>

  <Card title="Sitemap" icon="sitemap" href="/api-reference/web-scraping/sitemap">
    Discover URLs in public sitemaps before fetching page content.
  </Card>

  <Card title="Images" icon="images" href="/api-reference/web-scraping/images">
    Extract image assets from a webpage, with optional metadata enrichment.
  </Card>

  <Card title="Screenshots" icon="camera" href="/api-reference/web-scraping/screenshot">
    Capture a webpage as an image.
  </Card>

  <Card title="Document parsing" icon="file-pdf" href="/api-reference/utility/parse">
    Convert PDFs, Office documents, images, and other supported files into Markdown.
  </Card>
</CardGroup>

### Brand data APIs

<CardGroup cols={3}>
  <Card title="Brand lookup" icon="building" href="/api-reference/brand-intelligence/brand">
    Retrieve company logos, colors, descriptions, social links, and industry tags where available.
  </Card>

  <Card title="Brand search" icon="magnifying-glass" href="/api-reference/brand-intelligence/search">
    Find indexed brands by name or domain prefix for autocomplete.
  </Card>

  <Card title="Simplified brand data" icon="compress" href="/guides/retrieve-simplified-brand-data">
    Get a smaller brand response with a domain, title, colors, logos, and backdrops.
  </Card>

  <Card title="Styleguide" icon="palette" href="/api-reference/brand-intelligence/styleguide">
    Extract a website's colors, typography, spacing, and component styles.
  </Card>

  <Card title="Fonts" icon="font" href="/api-reference/brand-intelligence/fonts">
    Identify a website's font families, fallbacks, and usage.
  </Card>

  <Card title="Logo Link" icon="image" href="/guides/get-logo-from-url">
    Embed a company logo directly using a separate public client ID.
  </Card>

  <Card title="NAICS classification" icon="tags" href="/api-reference/web-extraction/naics">
    Classify a company using 2022 NAICS industry codes.
  </Card>

  <Card title="SIC classification" icon="tags" href="/api-reference/web-extraction/sic">
    Classify a company using original SIC codes or the SEC's current list.
  </Card>
</CardGroup>

### Company and product data

<CardGroup cols={3}>
  <Card title="Product extraction" icon="tag" href="/api-reference/web-extraction/product">
    Extract pricing, images, descriptions, and other details from one product page.
  </Card>

  <Card title="Product discovery" icon="cart-shopping" href="/api-reference/web-extraction/products">
    Discover and extract up to 12 products from a website. Available in beta.
  </Card>

  <Card title="People enrichment" icon="user" href="/api-reference/people/enrich">
    Match identity clues to a person profile with a match score. Beta, paid plans.
  </Card>

  <Card title="Company news" icon="newspaper" href="/api-reference/news/search">
    Find current and historical company news by name, domain, ticker, or ISIN.
  </Card>

  <Card title="Company funding" icon="chart-line" href="/guides/retrieve-company-funding">
    Retrieve known funding rounds, dates, and amounts by company domain.
  </Card>
</CardGroup>

### Automation and utilities

<CardGroup cols={3}>
  <Card title="Batches" icon="layer-group" href="/api-reference/batches/submit">
    Process URL lists or website crawls asynchronously and retrieve the results.
  </Card>

  <Card title="Monitors" icon="bell" href="/api-reference/monitors/create">
    Track changes to pages, sitemaps, or structured data and receive signed webhooks.
  </Card>

  <Card title="Prefetch" icon="bolt" href="/api-reference/utility/prefetch">
    Warm brand or styleguide caches before you need the data. Paid subscription required.
  </Card>
</CardGroup>

## Before you ship

Context.dev is a hosted API, with [SDKs](/sdks) for TypeScript, Python, Ruby, Go, and PHP. There is no self-hosted edition.

Scraping can render JavaScript, but a login wall or bot challenge can still prevent access. Markdown results may come from a cache up to one day old by default; set `maxAgeMs=0` when you need a new fetch. Other endpoints have their own freshness rules.

Each guide explains its costs, limits, and failure cases.

<CardGroup cols={2}>
  <Card title="API reference" icon="code" href="/api-reference/web-scraping/markdown">
    Check the request parameters and response fields for each endpoint.
  </Card>

  <Card title="Production checklist" icon="list-check" href="/optimization/best-practices">
    Plan retries, data handling, and deployment behavior.
  </Card>
</CardGroup>
