> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Socrata Open Data: Socrata Discover Datasets

> Search the cross-domain Socrata catalog for datasets. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Search the cross-domain Socrata catalog for datasets.

<Info>
  Tool ID: `socrata_discover_datasets`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'socrata_discover_datasets',
  {
    "q": "software companies hiring engineers",
    "domains": "example.com",
    "categories": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute socrata_discover_datasets --input '{
  "q": "software companies hiring engineers",
  "domains": "example.com",
  "categories": "example"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "results": [
      {
        "resource": {
          "id": "id_123",
          "name": "Example",
          "description": "Example description"
        },
        "metadata": {
          "domain": "example.com"
        },
        "link": "example"
      }
    ],
    "resultSetSize": 123
  }
}
```

Use `deepline tools get socrata_discover_datasets --json` for the latest machine-readable contract.

## Input reference

Search the cross-domain Socrata catalog for datasets

| Name                 | Type      | Required | Default | Details                                                                                                                 |
| -------------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------- |
| `payload.q`          | `string`  | No       | —       | Full-text search over dataset titles and descriptions.                                                                  |
| `payload.domains`    | `string`  | No       | —       | Comma-separated domain filter, e.g. `data.cityofnewyork.us,data.cityofchicago.org`. Omit to search all Socrata domains. |
| `payload.categories` | `string`  | No       | —       | —                                                                                                                       |
| `payload.limit`      | `integer` | No       | `20`    | Minimum: 1. Maximum: 100.                                                                                               |
| `payload.offset`     | `integer` | No       | `0`     | Minimum: 0.                                                                                                             |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Search the cross-domain Socrata catalog for datasets",
    "properties": {
      "q": {
        "type": "string",
        "description": "Full-text search over dataset titles and descriptions."
      },
      "domains": {
        "type": "string",
        "description": "Comma-separated domain filter, e.g. `data.cityofnewyork.us,data.cityofchicago.org`. Omit to search all Socrata domains."
      },
      "categories": {
        "type": "string"
      },
      "limit": {
        "type": "integer",
        "default": 20,
        "minimum": 1,
        "maximum": 100
      },
      "offset": {
        "type": "integer",
        "default": 0,
        "minimum": 0
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                          | Type      | Required | Default | Details                                        |
| --------------------------------------------- | --------- | -------- | ------- | ---------------------------------------------- |
| `result.data`                                 | `object`  | Yes      | —       | Provider response payload.                     |
| `result.data.results`                         | `array`   | No       | —       | —                                              |
| `result.data.results[].resource`              | `object`  | No       | —       | —                                              |
| `result.data.results[].resource.id`           | `string`  | No       | —       | —                                              |
| `result.data.results[].resource.name`         | `string`  | No       | —       | —                                              |
| `result.data.results[].resource.description`  | `string`  | No       | —       | —                                              |
| `result.data.results[].resource.updatedAt`    | `string`  | No       | —       | —                                              |
| `result.data.results[].resource.columns_name` | `array`   | No       | —       | —                                              |
| `result.data.results[].metadata`              | `object`  | No       | —       | —                                              |
| `result.data.results[].metadata.domain`       | `string`  | No       | —       | —                                              |
| `result.data.results[].link`                  | `string`  | No       | —       | —                                              |
| `result.data.resultSetSize`                   | `integer` | No       | —       | —                                              |
| `result.meta`                                 | `object`  | No       | —       | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "resource": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "columns_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "metadata": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "link": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "resultSetSize": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Socrata Open Data provider guide](/docs/providers/socrata/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
