> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-docs-firecrawl-replit-connector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SourceSync.ai

> Firecrawl se integra con SourceSync.ai para funciones de web scraping.

[SourceSync.ai](https://sourcesync.ai) es una plataforma de Retrieval Augmented Generation (RAG) como servicio que te ayuda a crear aplicaciones de IA con tus propios datos. Esta guía explica cómo usar Firecrawl con SourceSync.ai para funciones de web scraping.

<div id="setup">
  ## Configuración
</div>

1. Primero, obtiene tu clave de API de Firecrawl desde tu [panel de Firecrawl](https://www.firecrawl.dev/app).

2. Configura tu espacio de nombres de SourceSync.ai para usar Firecrawl como proveedor de web scraping:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.sourcesync.ai/v1/namespaces/YOUR_NAMESPACE_ID \
    -H "Authorization: Bearer YOUR_SOURCE_SYNC_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "webScraperConfig": {
        "provider": "FIRECRAWL",
        "apiKey": "YOUR_FIRECRAWL_API_KEY"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.sourcesync.ai/v1/namespaces/YOUR_NAMESPACE_ID',
    {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${SOURCE_SYNC_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        webScraperConfig: {
          provider: 'FIRECRAWL',
          apiKey: 'YOUR_FIRECRAWL_API_KEY',
        },
      }),
    }
  )
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      'https://api.sourcesync.ai/v1/namespaces/YOUR_NAMESPACE_ID',
      headers={
          'Authorization': f'Bearer {SOURCE_SYNC_API_KEY}',
          'Content-Type': 'application/json',
      },
      json={
          'webScraperConfig': {
              'provider': 'FIRECRAWL',
              'apiKey': 'YOUR_FIRECRAWL_API_KEY',
          },
      },
  )
  ```
</CodeGroup>

<div id="usage">
  ## Uso
</div>

Una vez configurado, puedes usar los puntos de conexión de Web scraping de SourceSync.ai junto con las capacidades de Firecrawl. Estos son los principales métodos de ingesta:

<div id="url-list-ingestion">
  ### Ingesta de lista de URL
</div>

Extrae contenido de URL específicas:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.sourcesync.ai/v1/ingest/urls \
    -H "Authorization: Bearer YOUR_SOURCE_SYNC_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "namespaceId": "YOUR_NAMESPACE_ID",
      "ingestConfig": {
        "source": "URLS_LIST",
        "config": {
          "urls": [
            "https://example.com/page1",
            "https://example.com/page2"
          ],
          "scrapeOptions": {
            "includeSelectors": ["article", "main"],
            "excludeSelectors": [".navigation", ".footer"]
          }
        }
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.sourcesync.ai/v1/ingest/urls', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${SOURCE_SYNC_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      namespaceId: 'YOUR_NAMESPACE_ID',
      ingestConfig: {
        source: 'URLS_LIST',
        config: {
          urls: ['https://example.com/page1', 'https://example.com/page2'],
          scrapeOptions: {
            includeSelectors: ['article', 'main'],
            excludeSelectors: ['.navigation', '.footer'],
          },
        },
      },
    }),
  })
  ```

  ```python Python theme={null}
  response = requests.post(
      'https://api.sourcesync.ai/v1/ingest/urls',
      headers={
          'Authorization': f'Bearer {SOURCE_SYNC_API_KEY}',
          'Content-Type': 'application/json',
      },
      json={
          'namespaceId': 'YOUR_NAMESPACE_ID',
          'ingestConfig': {
              'source': 'URLS_LIST',
              'config': {
                  'urls': ['https://example.com/page1', 'https://example.com/page2'],
                  'scrapeOptions': {
                      'includeSelectors': ['article', 'main'],
                      'excludeSelectors': ['.navigation', '.footer'],
                  },
              },
          },
      },
  )
  ```
</CodeGroup>

<div id="website-crawling">
  ### Rastreo del sitio web
</div>

Rastrea todo un sitio web con reglas personalizadas:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.sourcesync.ai/v1/ingest/website \
    -H "Authorization: Bearer YOUR_SOURCE_SYNC_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "namespaceId": "YOUR_NAMESPACE_ID",
      "ingestConfig": {
        "source": "WEBSITE",
        "config": {
          "url": "https://example.com",
          "maxDepth": 3,
          "maxLinks": 100,
          "includePaths": ["/docs", "/blog"],
          "excludePaths": ["/admin"],
          "scrapeOptions": {
            "includeSelectors": ["article", "main"],
            "excludeSelectors": [".navigation", ".footer"]
          }
        }
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.sourcesync.ai/v1/ingest/website', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${SOURCE_SYNC_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      namespaceId: 'YOUR_NAMESPACE_ID',
      ingestConfig: {
        source: 'WEBSITE',
        config: {
          url: 'https://example.com',
          maxDepth: 3,
          maxLinks: 100,
          includePaths: ['/docs', '/blog'],
          excludePaths: ['/admin'],
          scrapeOptions: {
            includeSelectors: ['article', 'main'],
            excludeSelectors: ['.navigation', '.footer'],
          },
        },
      },
    }),
  })
  ```

  ```python Python theme={null}
  response = requests.post(
      'https://api.sourcesync.ai/v1/ingest/website',
      headers={
          'Authorization': f'Bearer {SOURCE_SYNC_API_KEY}',
          'Content-Type': 'application/json',
      },
      json={
          'namespaceId': 'YOUR_NAMESPACE_ID',
          'ingestConfig': {
              'source': 'WEBSITE',
              'config': {
                  'url': 'https://example.com',
                  'maxDepth': 3,
                  'maxLinks': 100,
                  'includePaths': ['/docs', '/blog'],
                  'excludePaths': ['/admin'],
                  'scrapeOptions': {
                      'includeSelectors': ['article', 'main'],
                      'excludeSelectors': ['.navigation', '.footer'],
                  },
              },
          },
      },
  )
  ```
</CodeGroup>

<div id="sitemap-processing">
  ### Procesamiento de sitemaps
</div>

Procesa todas las URL de un sitemap:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.sourcesync.ai/v1/ingest/sitemap \
    -H "Authorization: Bearer YOUR_SOURCE_SYNC_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "namespaceId": "YOUR_NAMESPACE_ID",
      "ingestConfig": {
        "source": "SITEMAP",
        "config": {
          "url": "https://example.com/sitemap.xml",
          "scrapeOptions": {
            "includeSelectors": ["article", "main"],
            "excludeSelectors": [".navigation", ".footer"]
          }
        }
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.sourcesync.ai/v1/ingest/sitemap', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${SOURCE_SYNC_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      namespaceId: 'YOUR_NAMESPACE_ID',
      ingestConfig: {
        source: 'SITEMAP',
        config: {
          url: 'https://example.com/sitemap.xml',
          scrapeOptions: {
            includeSelectors: ['article', 'main'],
            excludeSelectors: ['.navigation', '.footer'],
          },
        },
      },
    }),
  })
  ```

  ```python Python theme={null}
  response = requests.post(
      'https://api.sourcesync.ai/v1/ingest/sitemap',
      headers={
          'Authorization': f'Bearer {SOURCE_SYNC_API_KEY}',
          'Content-Type': 'application/json',
      },
      json={
          'namespaceId': 'YOUR_NAMESPACE_ID',
          'ingestConfig': {
              'source': 'SITEMAP',
              'config': {
                  'url': 'https://example.com/sitemap.xml',
                  'scrapeOptions': {
                      'includeSelectors': ['article', 'main'],
                      'excludeSelectors': ['.navigation', '.footer'],
                  },
              },
          },
      },
  )
  ```
</CodeGroup>

<div id="features">
  ## Funcionalidades
</div>

Al usar Firecrawl con SourceSync.ai, tienes acceso a:

* Compatibilidad con renderizado de JavaScript
* Limitación automática de la tasa
* Extracción de contenido basada en selectores CSS
* Rastreo recursivo con control de profundidad
* Procesamiento de sitemaps

<div id="resources">
  ## Recursos
</div>

* [Documentación de SourceSync.ai](https://sourcesync.ai)
* [Guía de scraping web](https://sourcesync.ai/web-scraping)
* [Referencia de la API](https://sourcesync.ai/api-reference/data-ingestion#ingest-urls)

Para obtener soporte adicional:

* Correo: [support@sourcesync.ai](mailto:support@sourcesync.ai)
* Discord: [Únete a nuestra comunidad](https://discord.gg/Fx3GnFKnRT)
