Saltar al contenido principal
GET
/
v1
/
retrieve
Seiteninhalt abrufen
curl --request GET \
  --url https://api.olostep.com/v1/retrieve \
  --header 'Authorization: Bearer <token>'
{
  "html_content": "<string>",
  "markdown_content": "<string>",
  "json_content": "<string>",
  "html_hosted_url": "<string>",
  "markdown_hosted_url": "<string>",
  "json_hosted_url": "<string>",
  "size_exceeded": true
}

Descripción

La API de recuperación permite acceder al contenido de lotes y URLs que han sido procesados. Esto es útil para obtener datos que han sido previamente analizados y almacenados.

Uso

Para recuperar contenido, realiza una solicitud GET a la ruta especificada. Asegúrate de incluir los parámetros necesarios para especificar el lote o URL que deseas recuperar.
GET /v1/retrieve?batch_id=12345

Parámetros

  • batch_id: El identificador único del lote que deseas recuperar.
  • url: La URL específica que deseas recuperar.

Ejemplo de Respuesta

{
  "status": "success",
  "data": {
    "content": "Aquí está el contenido procesado."
  }
}

Errores Comunes

  • 404 Not Found: El lote o URL especificado no existe.
  • 400 Bad Request: Falta un parámetro requerido o es inválido.

Notas

  • Asegúrate de que los lotes y URLs han sido previamente procesados antes de intentar recuperarlos.
  • La respuesta incluirá el contenido en el formato en que fue procesado originalmente.

Autorizaciones

Authorization
string
header
requerido

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

Parámetros de consulta

retrieve_id
string
requerido

Die ID des abzurufenden Seiteninhalts. Verfügbar in der Antwort der Endpunkte /v1/crawls/{crawl_id}/pages, /v1/scrapes/{scrape_id} oder /v1/batches/{batch_id}/items

formats
enum<string>[]

Optionale Liste, um nur bestimmte Formate in der Produktion abzurufen. Wenn nicht angegeben, werden alle Formate zurückgegeben.

Opciones disponibles:
html,
markdown,
json

Respuesta

Erfolgreiche Antwort mit Seiteninhalt.

html_content
string

HTML-Inhalt der Seite, falls angefordert und verfügbar.

markdown_content
string

Markdown-Inhalt der Seite, falls angefordert und verfügbar.

json_content
string

JSON-Inhalt der Seite, der von Parsern zurückgegeben wird, falls angefordert und verfügbar.

html_hosted_url
string

S3-Bucket-URL von html. Läuft in 7 Tagen ab.

markdown_hosted_url
string

S3-Bucket-URL von markdown. Läuft in 7 Tagen ab.

json_hosted_url
string

S3-Bucket-URL von json. Läuft in 7 Tagen ab.

size_exceeded
boolean

Wenn die Größe der Inhaltsobjekte das 6MB-Limit überschreitet. Wenn wahr, verwenden Sie gehostete S3-URLs, um den Inhalt zu erhalten.