Saltar al contenido principal
POST
/
map
Mapear varias URL en función de las opciones
curl --request POST \
  --url https://api.firecrawl.dev/v2/map \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ignoreCache": false,
  "ignoreQueryParameters": true,
  "includeSubdomains": true,
  "limit": 5000,
  "location": {
    "country": "US",
    "languages": [
      "en-US"
    ]
  },
  "search": "<string>",
  "sitemap": "include",
  "timeout": 60000,
  "url": "<string>"
}
'
import requests

url = "https://api.firecrawl.dev/v2/map"

payload = {
"ignoreCache": False,
"ignoreQueryParameters": True,
"includeSubdomains": True,
"limit": 5000,
"location": {
"country": "US",
"languages": ["en-US"]
},
"search": "<string>",
"sitemap": "include",
"timeout": 60000,
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ignoreCache: false,
ignoreQueryParameters: true,
includeSubdomains: true,
limit: 5000,
location: {country: 'US', languages: ['en-US']},
search: '<string>',
sitemap: 'include',
timeout: 60000,
url: '<string>'
})
};

fetch('https://api.firecrawl.dev/v2/map', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firecrawl.dev/v2/map",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ignoreCache' => false,
'ignoreQueryParameters' => true,
'includeSubdomains' => true,
'limit' => 5000,
'location' => [
'country' => 'US',
'languages' => [
'en-US'
]
],
'search' => '<string>',
'sitemap' => 'include',
'timeout' => 60000,
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.firecrawl.dev/v2/map"

payload := strings.NewReader("{\n \"ignoreCache\": false,\n \"ignoreQueryParameters\": true,\n \"includeSubdomains\": true,\n \"limit\": 5000,\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"search\": \"<string>\",\n \"sitemap\": \"include\",\n \"timeout\": 60000,\n \"url\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.firecrawl.dev/v2/map")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ignoreCache\": false,\n \"ignoreQueryParameters\": true,\n \"includeSubdomains\": true,\n \"limit\": 5000,\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"search\": \"<string>\",\n \"sitemap\": \"include\",\n \"timeout\": 60000,\n \"url\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.firecrawl.dev/v2/map")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ignoreCache\": false,\n \"ignoreQueryParameters\": true,\n \"includeSubdomains\": true,\n \"limit\": 5000,\n \"location\": {\n \"country\": \"US\",\n \"languages\": [\n \"en-US\"\n ]\n },\n \"search\": \"<string>\",\n \"sitemap\": \"include\",\n \"timeout\": 60000,\n \"url\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "links": [
    {
      "url": "<string>",
      "description": "<string>",
      "title": "<string>"
    }
  ],
  "success": true
}
{
"error": "Payment required to access this resource."
}
{
"error": "Request rate limit exceeded. Please wait and try again later."
}
{
"error": "An unexpected error occurred on the server."
}
¿Eres un agente de IA que necesita una clave de API de Firecrawl? Consulta firecrawl.dev/agent-onboarding/SKILL.md para obtener instrucciones de incorporación automatizada.

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Cuerpo

application/json
url
string<uri>
requerido

La URL base desde la que comenzar el rastreo

ignoreCache
boolean
predeterminado:false

Omitir la caché del sitemap para obtener URLs actualizadas. Los datos del sitemap se almacenan en caché hasta 7 días; usa este parámetro cuando tu sitemap se haya actualizado recientemente.

ignoreQueryParameters
boolean
predeterminado:true

No devuelvas direcciones URL con parámetros de consulta

includeSubdomains
boolean
predeterminado:true

Incluir subdominios del sitio web

limit
integer
predeterminado:5000

Número máximo de enlaces que se devolverán

Rango requerido: x <= 100000
location
object

Configuración de ubicación de la solicitud. Cuando se especifica, se utilizará un proxy adecuado si está disponible y se emularán la configuración de idioma y la zona horaria correspondientes. De manera predeterminada se usa 'US' si no se especifica.

Especifica una consulta de búsqueda para ordenar los resultados según su relevancia. Ejemplo: "blog" devolverá las URL que contengan la palabra "blog" en la URL, ordenadas por relevancia.

sitemap
enum<string>
predeterminado:include

Modo de uso del sitemap al mapear. Si lo configuras en skip, el sitemap no se usará para encontrar URL. Si lo configuras en only, solo se devolverán las URL que estén en el sitemap. De forma predeterminada (include), el sitemap y otros métodos se usarán conjuntamente para encontrar URL.

Opciones disponibles:
skip,
include,
only
threatProtection
Threat Protection Override · object

Anulación por solicitud de Protección contra amenazas. Los campos que proporciones reemplazan los campos correspondientes de la política de tu organización solo para esta solicitud; los campos omitidos conservan sus valores a nivel de organización. Requiere que Protección contra amenazas esté habilitada para tu equipo (función enterprise); de lo contrario, la solicitud se rechaza con un 403. Si tu organización ha deshabilitado las anulaciones por solicitud, cualquier solicitud que incluya este objeto se rechaza con un 403. Si Protección contra amenazas se aplica de forma obligatoria a tu equipo, mode no puede establecerse en off.

timeout
integer

Tiempo de espera en milisegundos. De forma predeterminada, no hay tiempo de espera.

Respuesta

Respuesta satisfactoria

success
boolean