• DATA
  • LOGIC
  • INSIGHT
  • HUMAN

How to filter Barcelona dataset records with your AI

Connect to the Ayuntamiento de Barcelona (CKAN) repository once. From then on, your agent handles the data lookups for you.

Ask AI about this page

Short answer

How can I filter specific rows in the Barcelona datasets?

Your agent uses the datastore search tool to query the CKAN repository for exact matches. You can isolate specific records by providing criteria like dates, locations, or categories. This gives you access to the specific rows you need.

The results

Where your data lands

The AI translates your questions into precise queries to pull the right information.

DATA

Filtered row sets

The AI pulls only the rows that match your criteria. You get a clean subset of the dataset instead of a massive file.

LOGIC

Targeted queries

Your agent handles the filtering logic. It maps your natural language requests to the specific columns in the CKAN resource.

INSIGHT

Immediate answers

Once the rows are isolated, your agent can summarize the data. You get direct answers to questions about the specific records found.

HUMAN

Final verification

The AI provides the data, but you decide if the results are correct. You remain in control of the final interpretation.

The workflow

What your AI does when the request arrives.

The AI acts as the interface between your chat and the Barcelona open data repository.

  1. Identify the target

    Your agent determines which dataset and which specific columns you want to query based on your prompt.

    bcn_datastore_search
  2. Run the query

    The AI executes a search against the CKAN datastore to find rows that meet your constraints.

    bcn_datastore_search
  3. Parse the data

    The tool returns the matching records, which your agent then organizes into a readable format.

    bcn_datastore_search
  4. Deliver findings

    Your agent presents the filtered rows or the specific answer you asked for.

    bcn_datastore_search

Try it

Copy these to start.

Use these prompts to begin querying the Barcelona datasets.

Starting points

Replace the bracketed text with the actual dataset names or column values you want to find.

Open Data BCN Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_iv5GYpi3FqmjfmjJOIvg9apgeu4Cf7aNs3ZIC6cs/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Open Data BCN capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "ayuntamiento-de-barcelona-ckan-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_iv5GYpi3FqmjfmjJOIvg9apgeu4Cf7aNs3ZIC6cs/mcp"
    }
  }
}
Copy into chat04
  • Find all records in the [dataset name] where the [column name] is [value].

  • Search the [dataset name] for any entries from the year [year].

  • List the top 10 rows from [dataset name] that match the criteria [criteria].

  • Filter the [dataset name] to show only records located in [district name].

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Ayuntamiento de Barcelona (CKAN) once, then ask.

One link connects this MCP to your client. Your login stays encrypted on our side, and you can start searching immediately.

Connect Ayuntamiento de Barcelona (CKAN) to your AI

FAQ

How the task behaves

  • 01

    Can the AI edit the Barcelona datasets?

    No. The tool only allows for searching and reading data. It cannot change or delete any records in the repository.

  • 02

    Can I use this to download huge files?

    No. This tool is for searching and filtering specific rows. It is not meant for bulk downloading entire datasets.

  • 03

    Does the AI know which columns are in a dataset?

    Yes. The AI uses the search tool to see the dataset structure so it knows which fields you can filter by.

  • 04

    Can I ask for math on the results?

    Yes. Once the AI has filtered the rows, you can ask it to calculate sums, averages, or other statistics.

  • 05

    What if my filter doesn't find anything?

    The AI will simply tell you that no records matched your criteria. It won't make up data.

  • More questions about Ayuntamiento de Barcelona (CKAN)? The Connector page answers them. See everything the Ayuntamiento de Barcelona (CKAN) Connector can do

Connect Open Data BCN to Claude, Cursor, ChatGPT & more