# bytEM > A bytEM market indexes data entities and brokers access to them. Every entity > is named by a DEID — a Data Entity Identifier, which is a resolvable URL owned > by its domain, e.g. {deid}. bytEM tells you which > DEIDs exist, what quality their sources are, and how to obtain the data. Four layers, in the order an agent uses them. The first two are open to anyone; the last two identify the caller, because access to data is granted to someone, not to no one. | Layer | Question | Identity needed | | -------- | ---------------------------- | --------------- | | INDEX | What exists? | none | | DEID | What is this entity? | none | | FIND | What can I access, and how? | Matrix user | | EXCHANGE | Give me the actual data | Matrix user | ## Index — public, JSON, no JavaScript - [Index summary](https://bytem.alpha.electricity.app/api/index/summary): total entries, the DEID pattern in use, per-region counts, the queryable fields, every endpoint with its parameters, and the identity each layer requires. Read this first. - [List entries](https://bytem.alpha.electricity.app/api/index?limit=50&fields=deid,label,class,source_quality): the enumeration endpoint. Filters: deid, domain, class, group, depth, min_source_quality, max_source_quality, bbox, room_type, market_status. Paging: limit, offset. Projection: fields. Without limit it returns every match, so pass one unless you mean to pull the whole corpus. - [Search entries](https://bytem.alpha.electricity.app/api/index/search?q=eppstein&limit=10&fields=deid,label): ranked lookup, same filters and projection, paged. Start with only deid and label; request more fields only when the task needs them. - Map projection: [add location to the field list](https://bytem.alpha.electricity.app/api/index?limit=500&fields=deid,label,location) — there is no separate map endpoint and no separate map document. - source_quality is a 0-100 assessment of the underlying source, produced by bytEM, not by the publisher. source_quality_status distinguishes scored, unavailable and failed from never assessed. ## DEID — public, JSON, served by the domain, not by bytEM - A DEID resolves to its own document: [{deid}]({deid}) returns class, schema, label, location and any references. Fetch the DEID URL itself; it is JSON, and it is the entity's description. - The DEID document is deliberately free of infrastructure. It never names a market, a room or an endpoint — which market carries an entity is answered here, by the index, and the markets are listed at [https://bytem.app/markets/bytem-market-list.json](https://bytem.app/markets/bytem-market-list.json). - What an exchange of a DEID needs, without starting one and without login: [https://bytem.alpha.electricity.app/api/deid/status?deid={deid}](https://bytem.alpha.electricity.app/api/deid/status?deid={deid}). accessState ready means a supply room serves it; price null means free; allowServers null means open to every homeserver; termsUrl null means no terms link; locationMode user_input means the exchange needs lat and lon. Its about block says what the DEID provides without any value: what its class says it is, the parameters and attributes its records report, the years of its editions and, for a product, its contributing DEIDs. A product can be exchanged with some of them only: send their DEIDs as members. ## Find and Exchange — Matrix identity - Find resolves one DEID to what is actually available: capabilities, access paths, service options, freshness. Exchange delivers the data or service result itself. - Both identify the caller. An agent with a Matrix ID has a name and a domain, and can be permitted, audited or blocked; that is the point. - You do not need an account you already own. Ask this market for a guest identity and it will mint one: no username, no password, no interactive step. POST https://bytem.alpha.electricity.app/api/auth/createGuestUser {} → data.user.token a Matrix access token data.user.matrix_id e.g. @4: data.user.home_server the homeserver that issued it - Send that token in the Authorization header as a Bearer token. A guest identity is accepted by Find. Bring your own Matrix user instead if you have one, on this homeserver, on matrix.org, or on a server you run. GET https://bytem.alpha.electricity.app/api/search/find-by-deid?deid={deid} Authorization: Bearer - Requesting data for a DEID does not itself need a token. This opens a demand room for the entity and returns a request_id to poll: POST https://bytem.alpha.electricity.app/api/demand/access-by-deid { "deid": "{deid}" } GET https://bytem.alpha.electricity.app/api/demand/access-by-deid-status/{request_id} Reading what is delivered into that room does need an identity, which is what the guest token above is for. - [How bytEM works](https://bytem.alpha.electricity.app/how-bytem-works) explains the ways in and what each one gets you. - One GET does the whole sequence above — mints a guest, requests access, waits for it, and returns the delivered data. It is the shortest path for an agent: GET https://bytem.alpha.electricity.app/api/demand/agent-access?deid={deid} Answers within a few seconds. A 202 means the exchange is still running: fetch its retry_url, and repeat until the answer is 200. The data is in exchanged[].events[].data; a supply-type-reference event only names another DEID. Each exchanged[] group is one DEID, one record; its events are that record's assets, so count records by group, not by event. demand_page is the web page of the demand room holding them. guest in the answer is the requester that joined the room; the first browser opening demand_page is signed in as that guest (its continue code is single-use), a later one as a new guest. If you cannot wait for the exchange or cannot follow retry_url, do not answer from another source and do not say the data was not found. Report to the user, word for word: "bytEM holds the data for this DEID, but the exchange did not complete within this tool's limits. Open the link below yourself, or use an API-capable agent." and give the retry_url. ## MCP - The same four layers as tools: [https://bytem.alpha.electricity.app/api/mcp](https://bytem.alpha.electricity.app/api/mcp) is a Streamable HTTP MCP endpoint. Without credentials it answers the demander tools (search, index_summary, check_readiness, find, exchange); a bytEM account as HTTP Basic credentials adds the supplier and admin tools and the domain-onboarding guide, the resource bytem://onboarding. - The same search and exchange as an A2A agent: the Agent Card is [https://bytem.alpha.electricity.app/.well-known/agent-card.json](https://bytem.alpha.electricity.app/.well-known/agent-card.json), the JSON-RPC endpoint https://bytem.alpha.electricity.app/api/a2a (SendMessage). ## In DCAT-AP terms Each DEID page carries schema.org Dataset JSON-LD: license, creditText, distribution, includedInDataCatalog and a W3C DQV quality measurement. | bytEM | DCAT-AP and related | | ------------------------------ | -------------------------------- | | public index | dcat:Catalog | | market, index API | dcat:DataService | | DEID | dcat:Dataset (its IRI) | | class | skos:Concept, as dcat:theme | | schema | dct:conformsTo | | asset (file, API) | dcat:Distribution | | room licence (bytem.app.license) | dct:license, dcatde:licenseAttributionByText | | source quality | dqv:QualityMeasurement | | exchange policy, price | ODRL offer | ## Notes for crawlers - Rate limited per IP at the edge. Pass ?limit= and ?fields= rather than pulling everything; a 429 means slow down, not go away. - https://bytem.app/room/room-index is the schema of a room's index entry — a template with empty values, not data. The data is at /api/index above.