{
  "openapi": "3.0.1",
  "info": {
    "title": "Socrata Open Data Search: Datasets and Rows | $1/1K",
    "description": "$1 per 1,000 results, platform usage included. Search any Socrata open data portal for datasets, or read the rows of one dataset with filters (SoQL). City, county, state and agency portals worldwide. No key needed at low volume. Not limited to permits.",
    "version": "0.1",
    "x-build-id": "WFOGlqxRfL3zbhkGN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one_dollar_store~socrata-open-data-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one_dollar_store-socrata-open-data-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/one_dollar_store~socrata-open-data-search/runs": {
      "post": {
        "operationId": "runs-sync-one_dollar_store-socrata-open-data-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/one_dollar_store~socrata-open-data-search/run-sync": {
      "post": {
        "operationId": "run-sync-one_dollar_store-socrata-open-data-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "domain": {
            "title": "Portal domain",
            "maxLength": 300,
            "type": "string",
            "description": "The open data portal, for example data.cityofchicago.org or data.ny.gov. To search for datasets it is optional: leave it empty to search all portals. To read rows it is required. You can also paste the address of a dataset page here and the dataset ID is taken from it."
          },
          "datasetId": {
            "title": "Dataset ID (to read rows)",
            "pattern": "^$|^[A-Za-z0-9]{4}-[A-Za-z0-9]{4}$",
            "maxLength": 9,
            "type": "string",
            "description": "Fill this to get the rows of one dataset, for example ydr8-5enu. It is the last part of the dataset page address, four characters, a dash and four characters. Leave it empty to search for datasets instead."
          },
          "searchQuery": {
            "title": "Search words (to find datasets)",
            "maxLength": 300,
            "type": "string",
            "description": "Words to look for in dataset names, descriptions and column names, for example building permits or 311 requests. Used when no dataset ID is given."
          },
          "assetType": {
            "title": "Kind of item to find",
            "enum": [
              "dataset",
              "all",
              "map",
              "chart",
              "file",
              "href",
              "story"
            ],
            "type": "string",
            "description": "Datasets are tables of rows. The other kinds are maps, charts, files, external links and stories published on the portal.",
            "default": "dataset"
          },
          "category": {
            "title": "Portal category",
            "maxLength": 100,
            "type": "string",
            "description": "Optional. Only datasets in this category, spelled as the portal spells it, for example Public Safety or Transportation."
          },
          "tags": {
            "title": "Portal tags",
            "maxItems": 10,
            "type": "array",
            "description": "Optional. Only datasets that carry all of these tags, one per line.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort datasets by",
            "enum": [
              "relevance",
              "page_views_total",
              "page_views_last_month",
              "updatedAt",
              "createdAt",
              "name"
            ],
            "type": "string",
            "description": "Order of the datasets when you search.",
            "default": "relevance"
          },
          "region": {
            "title": "Catalog region",
            "enum": [
              "us",
              "eu"
            ],
            "type": "string",
            "description": "Where Socrata lists the portal. Almost all portals, including US cities, states and agencies, are in the US catalog. Portals hosted in Europe are in the EU catalog.",
            "default": "us"
          },
          "where": {
            "title": "Filter rows (SoQL where)",
            "maxLength": 1000,
            "type": "string",
            "description": "Used when reading rows. A SoQL condition, for example issue_date > '2026-01-01'. Column names are the field names shown in the dataset search results."
          },
          "select": {
            "title": "Columns to return (SoQL select)",
            "maxLength": 1000,
            "type": "string",
            "description": "Used when reading rows. Comma separated column names, for example id, issue_date, street_name. Leave empty for all columns. Functions such as count(*) work together with Group by."
          },
          "group": {
            "title": "Group rows by (SoQL group)",
            "maxLength": 300,
            "type": "string",
            "description": "Used when reading rows. Column names to group by, for example community_area. Use it with a count or sum in Columns to return."
          },
          "order": {
            "title": "Order rows by (SoQL order)",
            "maxLength": 300,
            "type": "string",
            "description": "Used when reading rows. For example issue_date DESC. Leave empty to keep the portal's own row order."
          },
          "rowSearchText": {
            "title": "Words anywhere in the rows",
            "maxLength": 200,
            "type": "string",
            "description": "Used when reading rows. Keeps rows where any text column contains these words (the portal's full text search)."
          },
          "appToken": {
            "title": "Your own Socrata app token (optional)",
            "type": "string",
            "description": "Not needed at low volume. Portals throttle anonymous requests more strictly. If a run reports throttling, paste a free app token from the portal's developer settings here."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 10,
            "maximum": 10000,
            "type": "integer",
            "description": "The run stops after this many results (datasets or rows). Minimum 10, maximum 10,000.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}