Manage charts

List, get, change and delete the charts of your organization. All free.

Charts made with any key of your organization, from POST /v1/charts. None of these requests is billed. Stored charts expire after 90 days on pay as you go and never on the monthly credit plan (expires_at); an expired or deleted chart answers 404 chart_not_found.

List charts

GEThttps://api.typesearch.ai/v1/charts

Your charts, newest first, a page at a time.

Query

ParameterType
limitintegerHow many, 1 to 100. Default: 20.
beforestringThe next_before of the previous page.

Response

  • object"list"

    Always list.

  • dataobject[]

    Your organization’s charts, newest first.

    Show child attributes
    • idstring

      The chart id.

    • typestring

      The chart type.

    • titlestring

      Its title.

    • themestring

      Its theme.

    • localestring

      Its language.

    • created_atstring

      When it was created.

    • expires_atstring | null

      When it expires, or null if it never does.

    • embed_urlstring

      The page for an iframe.

    • image_urlstring

      The PNG.

    • svg_urlstring

      The SVG.

  • has_moreboolean

    Whether there are older charts.

  • next_beforestring | null

    Pass it as before for the next page. null on the last one.

Get a chart

GEThttps://api.typesearch.ai/v1/charts/{id}

One chart, with what is drawn, its plan and its sources: the same fields as the POST /v1/charts response, with usage.cost_usd at 0.

Path

ParameterType
idstringThe chart id, chart_….

Change a chart

PATCHhttps://api.typesearch.ai/v1/charts/{id}

Switches the type, the theme, the title, the subtitle or the language, and redraws from the same data: no new search, free. Send at least one field. type should be one of the chart's compatible_types; if the data doesn't fit it, the chart is drawn with the closest type that does and warnings says so (chart_type_adjusted). Without a title of your own, the title is rewritten for the new type and language.

The embed_url, image_url and svg_url stay the same. Embeds and images are cached for 5 minutes, so the change shows there within that time.

Body

  • typeenum<string>

    The new chart type: one of the chart’s compatible_types. If the data doesn’t fit it, the closest type is drawn, with a chart_type_adjusted warning.

    One of: line · area · bar · bar_horizontal · stacked_bar · pie · donut · scatter · funnel · timeline · kpi · table

  • themeenum<string>

    light, dark, editorial or electric.

  • titlestring

    A new title. Without a title of your own, the title is rewritten for the new type and language.

  • subtitlestring

    A new subtitle.

  • localeenum<string>

    Redraw it in another language: en or es.

Response

The updated chart, with the same fields as the POST /v1/charts response.

Delete a chart

DELETEhttps://api.typesearch.ai/v1/charts/{id}

Deletes the chart. Its embed, image and SVG stop working; copies already cached can take a few minutes to go.

Path

ParameterType
idstringThe chart id, chart_….