Content
Reads all or part of the downloaded page for a task, typically one created by Fetch. If processing is pending, poll the same content URL
Endpoint
GET /api/v3/tasks/{taskId}/content
Path Parameters
| Name | Type | Description |
|---|---|---|
| taskId | string | Required. Download task ID returned by job start, in download task records from crawl requests, or embedded in a 202 Location URL from async task endpoints |
Query Parameters
| Name | Type | Description |
|---|---|---|
| startIndex | int | Optional. Optional. Zero-based start index of the returned content substring. Omit or pass null to start at 0. A negative value or an index at or beyond the content length returns an empty ContentSpan |
| length | int | Optional. Optional. Maximum number of content characters to return from startIndex. Omit or pass null to return all remaining content; a value of 0 or less returns an empty ContentSpan |
Responses
200 (OK)
Returns ContentChunk as a ContentChunk.
202 (Accepted)
Task processing is pending. Retry the URL in the Location header after the number of seconds in Retry-After (currently 1) until the response is no longer 202 (Accepted).
400 (Bad Request)
Invalid request parameters. Refer to the response text for more information
403 (Forbidden)
Access restricted. Refer to the response text for more information
404 (Not Found)
Task not found
422 (Unprocessable Content)
There is an issue with processing the page content. Refer to the response text for more information
Data Contracts
ContentChunk
Reports the full downloaded content length and the full or requested content span for one task
Fields:
| Name | Type | Description |
|---|---|---|
| ContentLength | int or null | Optional. Length of the full downloaded page content in characters |
| ContentSpan | string or null | Optional. Full downloaded content or the requested substring. An invalid or non-positive range produces an empty string |