list_blocks returns its parts by kind.
the content of a sourceits blocks, each a thing of its owntextthe words, with their bold and their struck texttableevery cell, merged cells keptimageits address and its captionfootnotetied to the sentence it explains
List the tables of a record
Send the id of the record and the kind of block you want.CONTENTS_ID with the id of a record.
Each block of the response is one table. This response is cut to the table of its one block.
200 OK
rows has the cells as the source displays them. Every row has every column, and an empty cell is an empty string. header_rows and header_columns name the headings by their position, counted from 0.
A block also has its place: its section, and on a document its page. A table that continues over several pages of a document is one block.
Read a merged cell
a table with a merged heading2025SegmentH1H2Europe1.9 bn2.2 bnAsia1.1 bn1.4 bnone figure, with its 3 headings2.2 bnEurope2025H2as plain text: 1.9 bn 2.2 bn 1.1 bn 1.4 bnas cells, no figure loses its heading
spans lists each merged cell with the row and the column it starts in and the number of rows and columns it covers. The text of the cell is in every slot it covers. This table has one heading over 2 columns.
A table with a merged heading
2025 covers columns 1 and 2. Its text is in both slots of the first row, so the figure 2.2 bn can be read with its 3 headings: Europe, 2025, and H2. Code that reads one column gets the right heading without a look at spans.
Tell a computed cell from an entered one
In a spreadsheet each sheet is a section with the sheet’s name, and its cells come as the sheet displays them. The table has 2 more fields.top_left_cell is the address of its first cell on the sheet, such as B4. formula_cells lists the cells that had a formula, so you know which values were computed and which were typed in.
The arithmetic of a document is not checked for you. The cells are there to check it: your code can add a column and compare the sum with the total that the document states.
Know which sources give tables as cells
A table comes cell by cell where the source says what its rows and columns are.basis on a table says where its structure came from, and structure means the source itself has it.
Get the other kinds of block
block_kinds takes 10 kinds, and a report draws on these 5 beside the table.
The other kinds are
embed, media, divider, and interactive.
A footnote stays tied to its text. The reference is in the text as [^n], and the block of the note lists the blocks that cite it in note_for, where the document links them.
Text inside an image is not read on a source that has text of its own. If a chart matters, give the image’s address to a model that reads images.
Get the method of a paper as blocks
The method of a scientific paper is in its formulas, its code listings, and its tables. Each of them is a block of its own kind, so one request returns them without the text around them. This request asks for the formulas and the code of a paper.200 OK
code_language names its language where the source states it. A report that says how a result was computed can then quote the formula and the code that computes it, each with its page.
A formula is a math block where the source has the structure of the formula. A formula that a document has only as a picture comes as flat text or not at all.
Get the tables while you fetch
A fetch can return the blocks itself. Withformats set to json and block_kinds set to table, the response has the tables of the page as blocks and nothing else of its text.
Request body
SOURCE_URL with the address of a page or a document.
Check what a list of blocks costs
list_blocks reads the stored record, so it costs nothing. The key needs the scope contents:read. One page of results has at most 50 blocks and 20,000 characters unless you set page_size and max_characters, and the SDKs ask for the next page as you loop.