diff --git a/api-reference/endpoint/activity.mdx b/api-reference/endpoint/activity.mdx new file mode 100644 index 00000000..268c6e6f --- /dev/null +++ b/api-reference/endpoint/activity.mdx @@ -0,0 +1,13 @@ +--- +title: 'Activity' +openapi: '/api-reference/v2-openapi.json GET /activity' +--- + +Lists your recent API activity from the last 24 hours. Use this to discover job IDs, then retrieve results with the corresponding GET endpoint. + +| Endpoint | Retrieval Endpoint | +|---|---| +| `scrape` | `GET /v2/scrape/{id}` | +| `crawl` | `GET /v2/crawl/{id}` | +| `batch_scrape` | `GET /v2/batch/scrape/{id}` | +| `agent` | `GET /v2/extract/{id}` | diff --git a/api-reference/v1-endpoint/activity.mdx b/api-reference/v1-endpoint/activity.mdx new file mode 100644 index 00000000..43e8c263 --- /dev/null +++ b/api-reference/v1-endpoint/activity.mdx @@ -0,0 +1,13 @@ +--- +title: 'Activity' +openapi: '/api-reference/v1-openapi.json GET /activity' +--- + +Lists your recent API activity from the last 24 hours. Use this to discover job IDs, then retrieve results with the corresponding GET endpoint. + +| Endpoint | Retrieval Endpoint | +|---|---| +| `scrape` | `GET /v1/scrape/{id}` | +| `crawl` | `GET /v1/crawl/{id}` | +| `batch_scrape` | `GET /v1/batch/scrape/{id}` | +| `agent` | `GET /v1/extract/{id}` | diff --git a/api-reference/v1-openapi.json b/api-reference/v1-openapi.json index 42cb947f..05d62626 100644 --- a/api-reference/v1-openapi.json +++ b/api-reference/v1-openapi.json @@ -2067,6 +2067,111 @@ } } }, + "/activity": { + "get": { + "summary": "List recent API activity", + "operationId": "getActivity", + "description": "Lists your team's recent API activity from the last 24 hours. Returns metadata about each job including the job ID, which can be used with the corresponding GET endpoint (e.g. GET /v1/crawl/{id}) to retrieve full results. Supports cursor-based pagination and filtering by endpoint.", + "tags": ["Account"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "endpoint", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": ["scrape", "crawl", "batch_scrape", "search", "extract", "llmstxt", "deep_research", "map", "agent", "browser"] + }, + "description": "Filter by endpoint" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 50, + "minimum": 1, + "maximum": 100 + }, + "description": "Maximum number of results per page" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Cursor for pagination. Use the cursor value from the previous response." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The job ID. Use this with the corresponding GET endpoint to retrieve results." + }, + "endpoint": { + "type": "string", + "enum": ["scrape", "crawl", "batch_scrape", "search", "extract", "llmstxt", "deep_research", "map", "agent", "browser"], + "description": "The endpoint used for this job" + }, + "api_version": { + "type": "string", + "description": "The API version used for this request", + "example": "v1" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "When the job was created" + }, + "target": { + "type": "string", + "nullable": true, + "description": "The URL or query that was submitted" + } + } + } + }, + "cursor": { + "type": "string", + "nullable": true, + "description": "Cursor to use for the next page. Null if there are no more results." + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more results available" + } + } + } + } + } + } + } + } + }, "/search": { "post": { "summary": "Search and optionally scrape search results", diff --git a/api-reference/v2-openapi.json b/api-reference/v2-openapi.json index fde5f7ed..2c822967 100644 --- a/api-reference/v2-openapi.json +++ b/api-reference/v2-openapi.json @@ -2187,6 +2187,111 @@ } } }, + "/activity": { + "get": { + "summary": "List recent API activity", + "operationId": "getActivity", + "description": "Lists your team's recent API activity from the last 24 hours. Returns metadata about each job including the job ID, which can be used with the corresponding GET endpoint (e.g. GET /crawl/{id}) to retrieve full results. Supports cursor-based pagination and filtering by endpoint.", + "tags": ["Account"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "endpoint", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": ["scrape", "crawl", "batch_scrape", "search", "extract", "llmstxt", "deep_research", "map", "agent", "browser"] + }, + "description": "Filter by endpoint" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 50, + "minimum": 1, + "maximum": 100 + }, + "description": "Maximum number of results per page" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Cursor for pagination. Use the cursor value from the previous response." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The job ID. Use this with the corresponding GET endpoint to retrieve results." + }, + "endpoint": { + "type": "string", + "enum": ["scrape", "crawl", "batch_scrape", "search", "extract", "llmstxt", "deep_research", "map", "agent", "browser"], + "description": "The endpoint used for this job" + }, + "api_version": { + "type": "string", + "description": "The API version used for this request", + "example": "v1" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "When the job was created" + }, + "target": { + "type": "string", + "nullable": true, + "description": "The URL or query that was submitted" + } + } + } + }, + "cursor": { + "type": "string", + "nullable": true, + "description": "Cursor to use for the next page. Null if there are no more results." + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more results available" + } + } + } + } + } + } + } + } + }, "/search": { "post": { "summary": "Search and optionally scrape search results", diff --git a/docs.json b/docs.json index 5d2e89fd..705e383d 100755 --- a/docs.json +++ b/docs.json @@ -292,6 +292,7 @@ { "group": "Account Endpoints", "pages": [ + "api-reference/endpoint/activity", "api-reference/endpoint/credit-usage", "api-reference/endpoint/credit-usage-historical", "api-reference/endpoint/token-usage", @@ -493,6 +494,7 @@ { "group": "Account Endpoints", "pages": [ + "api-reference/v1-endpoint/activity", "api-reference/v1-endpoint/credit-usage", "api-reference/v1-endpoint/credit-usage-historical", "api-reference/v1-endpoint/token-usage",