{"schemaVersion":1,"resourceType":"connector","slug":"socrata","name":"Socrata","catalog":"socrata","description":"Any Socrata (Tyler Data & Insights) portal's catalog and datasets as SQL, with SoQL pushdown","language":"Python","categories":["civic"],"repository":"https://github.com/Query-farm/vgi-socrata","license":"0BSD","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.2.0","publishedAt":"2026-11-25T18:30:37Z","url":"https://github.com/Query-farm/vgi-socrata/releases/tag/v0.2.0"},"links":{"html":"https://query.farm/products/orchard/connectors/socrata/","llms":"https://query.farm/products/orchard/connectors/socrata/llms.txt","markdown":"https://query.farm/products/orchard/connectors/socrata/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/socrata.json","objects":"https://query.farm/products/orchard/api/v1/connectors/socrata/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=socrata&q={query}"},"authentication":{"mode":"optional","guidance":"Works without a token; an app token raises the portal's rate limits.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[{"type":"socrata","description":"Socrata app token (and optional base_url) for the portal hosts in the secret's SCOPE.","documentation":"https://github.com/Query-farm/vgi-socrata#app-tokens-and-secrets","parameters":[{"name":"app_token","type":"VARCHAR","required":false,"redact":true,"description":"Socrata app token, sent as X-App-Token; raises the anonymous throttling limit."},{"name":"base_url","type":"VARCHAR","required":false,"redact":false,"description":"Send this host's requests to another base URL (a caching proxy, mirror or local fixture server) while results keep naming the real portal."}],"requiredBy":[],"createSql":"CREATE SECRET socrata (\n    TYPE socrata,\n    app_token '<APP_TOKEN>',  -- secret\n    base_url  '<base_url>'\n);"}]},"deployment":{"local":{"methods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'socrata' AS socrata (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-socrata@v0.2.0 vgi-socrata-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'socrata' AS socrata (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-socrata:0.2.0'\n);"}]}],"pinnedMethods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'socrata' AS socrata (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-socrata@v0.2.0 vgi-socrata-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'socrata' AS socrata (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-socrata:0.2.0'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-socrata","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=socrata","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'socrata' AS socrata (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-socrata@v0.2.0 vgi-socrata-worker'\n);","attachOptions":[],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"The five most viewed NYC datasets about 311 service requests","sql":"SELECT dataset_id, title, page_views_last_month FROM socrata.main.datasets('data.cityofnewyork.us', q := '311 service requests') ORDER BY page_views_last_month DESC, dataset_id LIMIT 5","requiresCredentials":null,"note":null,"objects":[{"name":"socrata.main.datasets","kind":"table_function","links":{"html":"https://query.farm/products/orchard/connectors/socrata/#obj-main-datasets","markdown":"https://query.farm/products/orchard/connectors/socrata/objects/table_function.bWFpbg.ZGF0YXNldHM.md","json":"https://query.farm/products/orchard/api/v1/connectors/socrata/objects/table_function.bWFpbg.ZGF0YXNldHM.json"}}],"evidence":{"status":"captured_result","capturedAt":"2026-12-01T06:21:29+00:00","engineVersion":"2.0.1","protocolVersion":"3.4.0","releaseTag":"v0.2.0","sample":{"columns":["dataset_id","title","page_views_last_month"],"types":["VARCHAR","VARCHAR","BIGINT"],"rows":[["ygpa-z7cr","Housing Maintenance Code Complaints and Problems",808967],["erm2-nwe9","311 Service Requests from 2020 to Present",34596],["76ig-c548","311 Service Requests from 2010 to 2019",1837],["cs9t-e3x8","311 Service Level Agreements",578],["8sdw-8vja","Asset Management Parks System (AMPS) - Work Orders",449]],"more":false}},"artifact":null},"objects":{"total":7,"index":"https://query.farm/products/orchard/api/v1/connectors/socrata/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=socrata&q={query}"},"agentTasks":["Using the Socrata worker, what is the dataset id (four-by-four) of the NYC '311 Service Requests from 2020 to Present' dataset on data.cityofnewyork.us?","In NYC 311 service requests (dataset erm2-nwe9 on data.cityofnewyork.us), how many requests from the borough BROOKLYN were created in the first five minutes of 2024 (created_date from 2024-01-01 00:00:00 inclusive to 00:05:00 exclusive)?","How many Chicago Public Library branches are listed in the dataset x8fc-8rcq on data.cityofchicago.org?","What Socrata data type does the column created_date have in dataset erm2-nwe9 on data.cityofnewyork.us?","Count NYC 311 service requests (dataset erm2-nwe9 on data.cityofnewyork.us) per borough for 1 January 2024 (created_date from 2024-01-01T00:00:00 inclusive to 2024-01-02T00:00:00 exclusive), letting the portal do the counting. How many came from BROOKLYN?","Search every US Socrata portal for 'police use of force' datasets (first 10 results). Which portal domains appear?","Escape the text 100%_done so it matches literally inside a SoQL like pattern.","Quote the text O'Brien as a SoQL string literal with the Socrata worker."],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-socrata","harvest":{"status":"ok","method":"subprocess","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":4,"passed":4,"failed":0,"needs_credentials":0,"location":"uvx --from git+https://github.com/Query-farm/vgi-socrata@v0.2.0 vgi-socrata-worker","transport":"subprocess","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:18:18+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}