SERP

SERP Batch Endpoint

post/v1/serp/batch

Request body

Example request

{
  "inputs": [
    {
      "country": "US",
      "device": "desktop",
      "domain": "com",
      "locale": "en",
      "location": "New York, New York, United States",
      "num_results": 10,
      "page": 1,
      "parse": true,
      "query": "nimble web data",
      "resolve_url": true,
      "search_engine": "google_search",
      "callback_url": "https://example.com/webhook/callback",
      "storage_compress": true,
      "storage_object_name": "result-2024-01-15.json",
      "storage_type": "s3",
      "storage_url": "s3://bucket-name/path/to/object"
    }
  ],
  "shared_inputs": {
    "country": "US",
    "device": "desktop",
    "domain": "com",
    "locale": "en",
    "location": "New York, New York, United States",
    "num_results": 10,
    "page": 1,
    "parse": true,
    "query": "nimble web data",
    "resolve_url": true,
    "search_engine": "google_search",
    "callback_url": "https://example.com/webhook/callback",
    "storage_compress": true,
    "storage_object_name": "result-2024-01-15.json",
    "storage_type": "s3",
    "storage_url": "s3://bucket-name/path/to/object"
  }
}

Response

Batch created successfully

batch_idstring required

Unique identifier for the batch.

batch_sizenumber required

Number of tasks in the batch.

Example response

{
  "tasks": [
    {
      "batch_id": "4b0a90bf-c951-42e4-95b3-a95a65ba69fc",
      "created_at": "2024-01-15T10:30:00Z",
      "download_url": "https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000/results",
      "error": "Connection timeout",
      "error_type": "timeout_error",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "modified_at": "2024-01-15T10:35:00Z",
      "state": "pending",
      "status_code": 200,
      "status_url": "https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000"
    }
  ]
}

Changes

Changed in 5 of the 55 revisions of this API.546

    • added the new optional request property inputs/items/allOf[subschema #1]/resolve_url

      new-optional-request-property

    • added the new optional request property shared_inputs/allOf[subschema #1]/resolve_url

      new-optional-request-property

    • response property tasks/items/batch_id list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property tasks/items/download_url list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property tasks/items/error list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property tasks/items/error_type list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property tasks/items/output_url list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    This revision also has 39 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new in_progress enum value to the tasks/items/state response property for the response status 200

      response-property-enum-value-added

    • added the new labs enum value to the tasks/items/api_type response property for the response status 200

      response-property-enum-value-added

    • added the new queued enum value to the tasks/items/state response property for the response status 200

      response-property-enum-value-added

    • added the optional property tasks/items/queue to the response with the 200 status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 421a9851d61b12See the full diff
    • added the new fast-serp enum value to the tasks/items/api_type response property for the response status 200

      response-property-enum-value-added

    • added the new optional request property inputs/items/allOf[subschema #1]/show_hidden_results

      new-optional-request-property

    • added the new optional request property shared_inputs/allOf[subschema #1]/show_hidden_results

      new-optional-request-property

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added