For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordDashboard
DocumentationAPI ReferenceCookbook
DocumentationAPI ReferenceCookbook
  • API Reference
    • POSTStart instance
    • GETGet instance by ID
    • GETList all instances
    • GETList all browser authentication states
      • GETList available notebook kernels
      • POSTCreate new notebook
      • GETGet notebook by ID
      • POSTDelete notebook
      • POSTAdd cell to notebook
      • POSTExecute notebook cell
      • POSTExecute all cells in notebook
  • SDK Reference
    • Python SDK
    • TypeScript SDK
Logo
DiscordDashboard
API ReferenceNotebook

Add cell to notebook

POST
https://api.scrapybara.com/v1/instance/:instance_id/notebook/:notebook_id/cell
POST
/v1/instance/:instance_id/notebook/:notebook_id/cell
1import requests
2
3url = "https://api.scrapybara.com/v1/instance/instance_id/notebook/notebook_id/cell"
4
5payload = {
6 "type": "code",
7 "content": "content"
8}
9headers = {
10 "x-api-key": "<apiKey>",
11 "Content-Type": "application/json"
12}
13
14response = requests.post(url, json=payload, headers=headers)
15
16print(response.json())
1{
2 "id": "id",
3 "type": "code",
4 "content": "content",
5 "metadata": {
6 "key": "value"
7 },
8 "outputs": [
9 {
10 "key": "value"
11 }
12 ],
13 "execution_count": 1
14}
Was this page helpful?
Previous

Execute notebook cell

Next
Built with

Authentication

x-api-keystring
API Key authentication via header

Path parameters

instance_idstringRequired
notebook_idstringRequired

Request

This endpoint expects an object.
typeenumRequired
Allowed values:
contentstringRequired
metadatamap from strings to anyOptional

Response

Successful Response
idstring
typeenum
Allowed values:
contentstring
metadatamap from strings to any
outputslist of maps from strings to any
execution_countinteger

Errors

422
Notebook Add Cell Request Unprocessable Entity Error