Tables/Read
Allows you to read data from a given Factual table.
Requires a table key in the TABLE_KEY position of request url.
Basic Example
http://api.factual.com/v1/YOUR_API_KEY/tables/CIGf9f/read[.output_format]?limit=10&offset=0
Feature Details
Parameters
| Parameter |
Description |
Requirements |
Examples |
Default |
| limit |
the number of rows to return |
integer value |
10 |
200 |
| offset |
the number of rows to skip in the result |
integer value |
200 |
0 |
| sort_by |
a single value or an array of up to two of the following:
- column ordinal(s)
- column id(s)
- column name(s)
|
one or two of column ordinal (integer), field id (integer), or field name |
sort_by=0
sort_by=[0,1]
sort_by=1234
sort_by=[1234,12345]
sort_by=LastName
sort_by=[LastName,FirstName]
|
sorted by subject |
| sort_dir |
the direction of the sort - ascending or descending |
asc or desc |
asc
[asc.desc]
|
asc when single value [asc,asc] when array |
| subject |
subject value(s) to retrieve a single row by primary key labels |
value or list of values that covers a single subject (primary key) |
"Apple Inc." (in a list of companies)
["McDonalds","123 Main St."] (in a list of restaurants)
|
|
| subjectKey |
the unique identifier for a specific row |
string value (a row key) |
MttWppUhxVjrV6Bo9ASlBIf3obc |
|
| filters |
row and or vote filters constructed to limit results |
JSON encoded filters object |
See filter examples. |
|
| suppress_subject_key |
excludes row key from results |
boolean |
true
false
|
false |
| include_schema |
packages a table schema object into the results |
boolean |
true
false
|
false |
Result Payload
| Payload Field |
Description |
Examples |
| fields |
array of field names |
|
| data |
array of rows, each of which is an array of cell values |
[
['a','b','c']
['e','f','g']
]
|
| subject_columns |
array of ordinals representing column(s) that make up the subject (primary key) of the table (the subject key can always be used to identify a row, but it can also be identified by subject label) |
[1] |
| rows |
integer value of rows contained in the data object |
200 |
| total_rows |
integer value of total rows available in the table (with the given filter) |
409643
|
Additional Supported Output Formats