1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78949],{97001:function(e,s,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/apis/ticker",function(){return i(53492)}])},53492:function(e,s,i){"use strict";i.r(s);var t=i(85893),a=i(67294),r=i(41664),n=i.n(r),l=i(10241),c=i(7636),o=i(15600),d=i(6055),m=i(96503),p=i(49152),h=i(67509);let x={curl:`curl -X GET "https://api.api-ninjas.com/v1/ticker?ticker=AAPL" \\ 2 -H "X-Api-Key: YOUR_API_KEY"`,python:`import requests 3 4ticker = 'AAPL' 5api_url = 'https://api.api-ninjas.com/v1/ticker?ticker={}'.format(ticker) 6response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'}) 7if response.status_code == requests.codes.ok: 8 print(response.text) 9else: 10 print("Error:", response.status_code, response.text)`,javascript:`var ticker = 'AAPL' 11$.ajax({ 12 method: 'GET', 13 url: 'https://api.api-ninjas.com/v1/ticker?ticker=' + ticker, 14 headers: { 'X-Api-Key': 'YOUR_API_KEY'}, 15 contentType: 'application/json', 16 success: function(result) { 17 console.log(result); 18 }, 19 error: function ajaxError(jqXHR) { 20 console.error('Error: ', jqXHR.responseText); 21 } 22});`,nodejs:`const request = require('request'); 23var ticker = 'AAPL' 24request.get({ 25 url: 'https://api.api-ninjas.com/v1/ticker?ticker=' + ticker, 26 headers: { 27 'X-Api-Key': 'YOUR_API_KEY' 28 }, 29}, function(error, response, body) { 30 if(error) return console.error('Request failed:', error); 31 else if(response.statusCode != 200) return console.error('Error:', response.statusCode, body.toString('utf8')); 32 else console.log(body) 33});`,java:`import java.io.InputStream; 34import java.net.HttpURLConnection; 35import java.net.URL; 36 37import com.fasterxml.jackson.databind.ObjectMapper; 38 39URL url = new URL("https://api.api-ninjas.com/v1/ticker?ticker=AAPL"); 40HttpURLConnection connection = (HttpURLConnection) url.openConnection(); 41connection.setRequestProperty("accept", "application/json"); 42connection.setRequestProperty("X-Api-Key", "YOUR_API_KEY"); 43InputStream responseStream = connection.getInputStream(); 44ObjectMapper mapper = new ObjectMapper(); 45JsonNode root = mapper.readTree(responseStream); 46System.out.println(root.toString());`,swift:`let url = URL(string: "https://api.api-ninjas.com/v1/ticker?ticker=AAPL")! 47var request = URLRequest(url: url) 48request.setValue("YOUR_API_KEY", forHTTPHeaderField: "X-Api-Key") 49let task = URLSession.shared.dataTask(with: request) {(data, response, error) in 50 guard let data = data else { return } 51 print(String(data: data, encoding: .utf8)!) 52} 53task.resume()`},u={name:"Apple Inc.",ticker:"AAPL",logo_url:"https://api-ninjas-data.s3.us-west-2.amazonaws.com/ticker_logos/AAPL_7c799a12f38f.png",chief_executive_officer:"Timothy D. Cook",address:{address:"One Apple Park Way",city:"Cupertino",state:"CA",zip:"95014"},latest_price:269.05,latest_market_cap:399280962e4,latest_dividend:1.02,cik:"0000320193",cusip:"037833100",isin:"US0378331005",exchange:"NASDAQ",website:"https://www.apple.com",phone_number:"(408) 996-1010",ipo_date:"1980-12-12",latest_earnings:{year:2025,quarter:4},sector:"Technology",industry:"Computer Hardware",sic_code:"3571",sic_description:"Electronic Computers"},j=[{ticker:"AAPL",company_name:"Apple Inc.",exchange:"NASDAQ",logo_url:"https://api-ninjas-data.s3.us-west-2.amazonaws.com/ticker_logos/AAPL_7c799a12f38f.png"},{ticker:"APPLX",company_name:"Appleseed Fund",exchange:"NASDAQ",logo_url:"https://api-ninjas-data.s3.us-west-2.amazonaws.com/ticker_logos/APPLX_dea257547fba.png"},{ticker:"PEGY",company_name:"Pineapple Energy Inc.",exchange:"NASDAQ",logo_url:"https://api-ninjas-data.s3.us-west-2.amazonaws.com/ticker_logos/PEGY_efb8b64c3d3d.png"},{ticker:"APLE",company_name:"Apple Hospitality REIT, Inc.",exchange:"NYSE",logo_url:"https://api-ninjas-data.s3.us-west-2.amazonaws.com/ticker_logos/APLE_8cba7154f217.png"},"..."];class g extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),this.handleSubmit2=this.handleSubmit2.bind(this),this.state={disableSubmit:!1,base_url:"https://api.api-ninjas.com/v1/ticker",url1:"https://api.api-ninjas.com/v1/ticker?ticker=",param1:"AAPL",response:u,url2:"https://api.api-ninjas.com/v1/tickersearch?name=",param2:"Apple",param3:"",response2:j}}componentDidMount(){window.Prism?.highlightAll()}handleSubmit(){this.setState({disableSubmit:!0,response:null});let e=encodeURIComponent(this.state.param1),s=this.state.url1+e;console.log(s),fetch(s,{headers:{"X-Api-Key":this.props.apiKey||""}}).then(e=>e.json()).then(e=>{this.setState({response:e})},e=>{}).finally(()=>{this.setState({disableSubmit:!1})}),window.gtag("event",this.state.url1.substring(27))}handleSubmit2(){this.setState({disableSubmit:!0,response2:null});let e=encodeURIComponent(this.state.param2),s=this.state.url2+e;if(this.state.param3){let e=encodeURIComponent(this.state.param3);s+="&negative_keywords="+e}console.log(s),fetch(s,{headers:{"X-Api-Key":this.props.apiKey||""}}).then(e=>e.json()).then(e=>{this.setState({response2:e})},e=>{}).finally(()=>{this.setState({disableSubmit:!1})}),window.gtag("event",this.state.url2.substring(27))}render(){return(0,t.jsxs)(c.Z,{title:"Ticker API - API Ninjas",description:"Ticker API by API Ninjas - get comprehensive company profile information including executive details, financial data, and identifiers.",sidebarName:"Ticker",children:[(0,t.jsxs)("div",{className:"d-flex flex-column flex-md-row px-4",children:[(0,t.jsx)("div",{className:"w-100 flex-md-fill max-width-md-50 px-2",children:(0,t.jsx)("div",{className:"content-inner mx-auto mt-4",children:(0,t.jsx)("div",{className:"",children:(0,t.jsx)("div",{className:"section-block",children:(0,t.jsxs)("div",{id:"doc-header",className:"doc-header",children:[(0,t.jsx)("h1",{className:"doc-title",children:"Ticker API"}),(0,t.jsx)("p",{children:"The Ticker API provides comprehensive company profile information for publicly traded companies, including executive details, financial metrics, identifiers, and contact information."}),(0,t.jsx)("p",{children:"Available endpoints:"}),(0,t.jsxs)("ul",{children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("a",{className:"bold",href:"#ticker-endpoint",children:"/v1/ticker"})," ","- Get detailed company profile information for any given ticker symbol"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("a",{className:"bold",href:"#tickersearch-en
53dpoint",children:"/v1/tickersearch"})," ","- Search for ticker symbols by company name"]})]})]})})})})}),(0,t.jsx)("div",{className:"w-100 flex-md-fill max-width-md-50 px-2 pt-md-4",children:(0,t.jsx)("div",{className:"w-100 section-block",children:(0,t.jsx)(l.Z,{apiId:129})})})]}),(0,t.jsx)(h.Z,{count:2}),(0,t.jsx)(p.Z,{id:"ticker-endpoint",path:"/v1/ticker",children:(0,t.jsxs)("div",{className:"d-flex flex-column flex-md-row px-4",children:[(0,t.jsx)("div",{className:"w-100 flex-md-fill max-width-md-50 px-2",children:(0,t.jsx)("div",{className:"content-inner mx-auto",children:(0,t.jsxs)("div",{className:"doc-section",children:[(0,t.jsxs)("div",{className:"section-block",children:[(0,t.jsx)("p",{children:(0,t.jsx)("code",{children:this.state.base_url})}),(0,t.jsx)("p",{children:"Returns comprehensive company profile information including company name, CEO, address, financial data, exchange information, identifiers (CIK, CUSIP, ISIN), and latest earnings information when available."})]}),(0,t.jsxs)("div",{className:"api-block",children:[(0,t.jsx)("h4",{children:"Parameters"}),(0,t.jsx)("ul",{className:"list-group api-list",children:(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"ticker"})}),"\xa0\xa0required"]}),(0,t.jsxs)("p",{className:"my-1",children:["Stock ticker symbol (e.g., ",(0,t.jsx)("code",{children:"AAPL"}),")."]})]})})]}),(0,t.jsxs)("div",{className:"api-block",children:[(0,t.jsx)("h4",{children:"Headers"}),(0,t.jsx)("ul",{className:"list-group api-list",children:(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"X-Api-Key"})}),"\xa0\xa0required"]}),(0,t.jsx)("p",{className:"my-1",children:"API Key associated with your account."})]})})]}),(0,t.jsxs)("div",{className:"api-block",children:[(0,t.jsx)("h4",{children:"Response Fields"}),(0,t.jsxs)("p",{className:"mb-3",children:["A JSON object with the following fields or"," ",(0,t.jsx)(n(),{href:"/error-codes",className:"bold",children:"an error"})," ","if the request is unsuccessful."]}),(0,t.jsxs)("ul",{className:"list-group api-list",children:[(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"name"})})}),(0,t.jsx)("p",{className:"my-1",children:"Company name."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"ticker"})})}),(0,t.jsx)("p",{className:"my-1",children:"Stock ticker symbol."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"logo_url"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsxs)("p",{className:"my-1",children:["URL of the company logo as a PNG, or"," ",(0,t.jsx)("code",{children:"null"})," when no logo is available for that company. A non-null value always points to a working image, so you can render it without a fallback check."]})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"chief_executive_officer"})})}),(0,t.jsx)("p",{className:"my-1",children:"Name of the CEO."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"address"})})}),(0,t.jsxs)("p",{className:"my-1",children:["Company address object containing"," ",(0,t.jsx)("code",{children:"address"}),", ",(0,t.jsx)("code",{children:"city"}),","," ",(0,t.jsx)("code",{children:"state"}),", and ",(0,t.jsx)("code",{children:"zip"})," fields."]})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"latest_price"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Latest stock price."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"latest_market_cap"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Latest market capitalization."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"latest_dividend"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Latest dividend payment."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"cik"})})}),(0,t.jsx)("p",{className:"my-1",children:"Central Index Key (SEC identifier)."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"cusip"})})}),(0,t.jsx)("p",{className:"my-1",children:"Committee on Uniform Securities Identification Procedures number."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"isin"})})}),(0,t.jsx)("p",{className:"my-1",children:"International Securities Identification Number."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"exchange"})})}),(0,t.jsxs)("p",{className:"my-1",children:["Stock exchange where the company is listed (e.g., ",(0,t.jsx)("code",{children:"NASDAQ"}),", ",(0,t.jsx)("code",{children:"NYSE"}),")."]})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"website"})})}),(0,t.jsx)("p",{className:"my-1",children:"Company website URL."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"phone_number"})})}),(0,t.jsx)("p",{className:"my-1",children:"Company phone number."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"ipo_date"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Initial public offering date in YYYY-MM-DD format."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"latest_earnings"})})}),(0,t.jsxs)("p",{className:"my-1",children:["Latest earnings information object c
53ontaining"," ",(0,t.jsx)("code",{children:"year"})," and ",(0,t.jsx)("code",{children:"quarter"})," ","fields when available."]})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"sector"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Company sector in the API Ninjas classification (e.g. Technology, Financials, Health Care). Available for all companies."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"industry"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Company industry (sub-sector) within its sector (e.g. Semiconductors, Banks, Airlines). Available for all companies."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"sic_code"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Standard Industrial Classification (SIC) code from the company's SEC filing. US-listed companies only (null for non-US)."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"sic_description"})}),"\xa0\xa0",(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-10",children:"Premium only"})]}),(0,t.jsx)("p",{className:"my-1",children:"Human-readable description of the SIC code. US-listed companies only (null for non-US)."})]})]})]})]})})}),(0,t.jsx)("div",{className:"w-100 flex-md-fill max-width-md-50 px-2",children:(0,t.jsxs)("div",{className:"doc-section section-block content-inner",children:[(0,t.jsx)(m.Z,{hasUser:this.props.hasUser,apiKey:this.props.apiKey,url:this.state.url1+encodeURIComponent(this.state.param1),onSubmit:()=>this.handleSubmit(),disableSubmit:this.state.disableSubmit,response:this.state.response,defaultResponse:u,onRestore:()=>this.setState({response:u}),children:(0,t.jsxs)("div",{className:"rounded-pill mt-3",children:[(0,t.jsx)("label",{className:"sr-only",htmlFor:"inlineFormInputGroup",children:"Ticker"}),(0,t.jsxs)("div",{className:"input-group mb-2",children:[(0,t.jsx)("div",{className:"input-group-prepend",children:(0,t.jsx)("div",{className:"input-group-text",children:"ticker"})}),(0,t.jsx)("input",{id:"sample-api-request",className:"form-control api-example-query-short",defaultValue:this.state.param1,onChange:e=>this.setState({param1:e.currentTarget.value})})]})]})}),(0,t.jsxs)("div",{id:"searchcodeexample",className:"api-block my-4",children:[(0,t.jsx)("h4",{children:"Code Examples"}),(0,t.jsx)(o.Z,{samples:x,apiKey:this.props.apiKey})]}),(0,t.jsx)("div",{children:(0,t.jsx)("p",{className:"font-14",children:"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation."})})]})})]})}),(0,t.jsx)(p.Z,{id:"tickersearch-endpoint",path:"/v1/tickersearch",badge:(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("a",{target:"_blank",href:"/pricing",className:"new-box font-12",children:"Premium only"})}),children:(0,t.jsxs)("div",{className:"d-flex flex-column flex-md-row px-4",children:[(0,t.jsx)("div",{className:"w-100 flex-md-fill max-width-md-50 px-2",children:(0,t.jsx)("div",{className:"content-inner mx-auto",children:(0,t.jsxs)("div",{className:"doc-section",id:"tickersearch-endpoint",children:[(0,t.jsxs)("div",{className:"section-block",children:[(0,t.jsx)("p",{children:(0,t.jsx)("code",{children:"https://api.api-ninjas.com/v1/tickersearch"})}),(0,t.jsx)("p",{children:"Returns a list of at most 100 ticker symbols matching a given company name. Results are sorted by exchange size (largest exch
53anges first) to prioritize the most common listings."})]}),(0,t.jsxs)("div",{className:"api-block",children:[(0,t.jsx)("h4",{children:"Parameters"}),(0,t.jsxs)("ul",{className:"list-group api-list",children:[(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"name"})}),"\xa0\xa0required"]}),(0,t.jsxs)("p",{className:"my-1",children:["Company name to search for (e.g.,"," ",(0,t.jsx)("code",{children:"Apple"}),")."]})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"negative_keywords"})}),"\xa0\xa0optional"]}),(0,t.jsxs)("p",{className:"my-1",children:["Comma-separated list of keywords to filter out from results. If any negative keyword appears in a company name (case-insensitive), that result will be excluded (e.g.,"," ",(0,t.jsx)("code",{children:"pineapple,appleseed"}),")."]})]})]})]}),(0,t.jsxs)("div",{className:"api-block",children:[(0,t.jsx)("h4",{children:"Headers"}),(0,t.jsx)("ul",{className:"list-group api-list",children:(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsxs)("h5",{className:"my-1 text-muted",children:[(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"X-Api-Key"})}),"\xa0\xa0required"]}),(0,t.jsx)("p",{className:"my-1",children:"API Key associated with your account."})]})})]}),(0,t.jsxs)("div",{className:"api-block",children:[(0,t.jsx)("h4",{children:"Response Fields"}),(0,t.jsxs)("p",{className:"my-1 mb-3",children:["A JSON array of objects (100 max), each containing the following fields, or"," ",(0,t.jsx)(n(),{href:"/error-codes",className:"bold",children:"an error"})," ","if the request is unsuccessful."]}),(0,t.jsxs)("ul",{className:"list-group api-list",children:[(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"ticker"})})}),(0,t.jsx)("p",{className:"my-1",children:"Stock ticker symbol."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"company_name"})})}),(0,t.jsx)("p",{className:"my-1",children:"Full company name."})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"exchange"})})}),(0,t.jsxs)("p",{className:"my-1",children:["Stock exchange where the company is listed (e.g., ",(0,t.jsx)("code",{children:"NASDAQ"}),", ",(0,t.jsx)("code",{children:"NYSE"}),")."]})]}),(0,t.jsxs)("li",{className:"list-group-item px-3 py-2 light-bg",children:[(0,t.jsx)("h5",{className:"my-1 text-muted",children:(0,t.jsx)("strong",{children:(0,t.jsx)("code",{children:"logo_url"})})}),(0,t.jsxs)("p",{className:"my-1",children:["URL of the company logo as a PNG, or"," ",(0,t.jsx)("code",{children:"null"})," when no logo is available for that company. Useful for rendering search or autocomplete results with a brand mark beside each match."]})]})]})]})]})})}),(0,t.jsx)("div",{className:"w-100 flex-md-fill max-width-md-50 px-2",children:(0,t.jsxs)("div",{className:"doc-section section-block content-inner",children:[(0,t.jsxs)(m.Z,{hasUser:this.props.hasUser,apiKey:this.props.apiKey,url:this.state.url2+encodeURIComponent(this.state.param2)+(this.state.param3?"&negative_keywords="+encodeURIComponent(this.state.param3):""),onSubmit:()=>this.handleSubmit2(),disableSubmit:this.state.disableSubmit,response:this.state.response2,defaultResponse:j,onRestore:()=>this.setState({response2:j}),children:[(0,t.jsxs)("div",{className:"rounded-pill mt-3",children:[(0,t.jsx)("label",{className:"sr-only",htmlFor:"inlineFormInputGroup",children:"Company Name"}),(0,t.jsxs)("div",{className:"input-group mb-2",children:[(0,t.jsx)("div",{className:"input-group-prepend",children:(0,t.jsx)("div",{className:"input-group-text",children:"name"})}),(0,t.jsx)("input",{id:"sample-api-request-2",className:"form-control api-example-query-short",defaultValue:this.state.param2,onChange:e=>this.setState({param2:e.currentTarget.value})})]})]}),(0,t.jsxs)("div",{className:"rounded-pill mt-3",children:[(0,t.jsx)("label",{className:"sr-only",htmlFor:"inlineFormInputGroup",children:"Negative Keywords"}),(0,t.jsxs)("div",{className:"input-group mb-2",children:[(0,t.jsx)("div",{className:"input-group-prepend",children:(0,t.jsx)("div",{className:"input-group-text",children:"negative_keywords"})}),(0,t.jsx)("input",{id:"sample-api-request-3",className:"form-control api-example-query-short",defaultValue:this.state.param3,onChange:e=>this.setState({param3:e.currentTarget.value})})]})]})]}),(0,t.jsxs)("div",{className:"api-block my-4",children:[(0,t.jsx)("h4",{children:"Code Examples"}),(0,t.jsx)(o.Z,{samples:(0,d.p7)("/v1/tickersearch",[["name","Apple"]]),apiKey:this.props.apiKey})]})]})})]})})]})}}s.default=g},67509:function(e,s,i){"use strict";var t=i(85893);
53i(67294);var a=i(14915),r=i(8998),n=i.n(r);let l=e=>{let{count:s}=e;return(0,t.jsxs)("div",{className:n().toolbar,children:[(0,t.jsxs)("span",{className:n().toolbarLabel,children:[s," endpoints"]}),(0,t.jsxs)("span",{className:n().toolbarActions,children:[(0,t.jsx)("button",{type:"button",className:n().toolbarBtn,onClick:()=>(0,a.dU)(!0),children:"Expand all"}),(0,t.jsx)("button",{type:"button",className:n().toolbarBtn,onClick:()=>(0,a.dU)(!1),children:"Collapse all"})]})]})};s.Z=l},6055:function(e,s,i){"use strict";i.d(s,{p7:function(){return a}});let t="https://api.api-ninjas.com";function a(e,s){let i=function(e,s){let i=e.startsWith("/")?e:`/${e}`,a=s?Array.isArray(s)?s:Object.entries(s):[];if(0===a.length)return`${t}${i}`;let r=a.map(e=>{let[s,i]=e;return`${encodeURIComponent(s)}=${encodeURIComponent(String(i)).replace(/%2C/g,",")}`}).join("&");return`${t}${i}?${r}`}(e,s);return{curl:`curl -X GET "${i}" \\ 54 -H "X-Api-Key: YOUR_API_KEY"`,python:`import requests 55 56api_url = '${i}' 57response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'}) 58if response.status_code == requests.codes.ok: 59 print(response.text) 60else: 61 print("Error:", response.status_code, response.text)`,javascript:`$.ajax({ 62 method: 'GET', 63 url: '${i}', 64 headers: { 'X-Api-Key': 'YOUR_API_KEY'}, 65 contentType: 'application/json', 66 success: function(result) { 67 console.log(result); 68 }, 69 error: function ajaxError(jqXHR) { 70 console.error('Error: ', jqXHR.responseText); 71 } 72});`,nodejs:`const request = require('request'); 73 74request.get({ 75 url: '${i}', 76 headers: { 77 'X-Api-Key': 'YOUR_API_KEY' 78 }, 79}, function(error, response, body) { 80 if(error) return console.error('Request failed:', error); 81 else if(response.statusCode != 200) return console.error('Error:', response.statusCode, body.toString('utf8')); 82 else console.log(body); 83});`,java:`import java.io.InputStream; 84import java.net.HttpURLConnection; 85import java.net.URL; 86 87import com.fasterxml.jackson.databind.JsonNode; 88import com.fasterxml.jackson.databind.ObjectMapper; 89 90URL url = new URL("${i}"); 91HttpURLConnection connection = (HttpURLConnection) url.openConnection(); 92connection.setRequestProperty("accept", "application/json"); 93connection.setRequestProperty("X-Api-Key", "YOUR_API_KEY"); 94InputStream responseStream = connection.getInputStream(); 95ObjectMapper mapper = new ObjectMapper(); 96JsonNode root = mapper.readTree(responseStream); 97System.out.println(root.toString());`,swift:`let url = URL(string: "${i}")! 98var request = URLRequest(url: url) 99request.setValue("YOUR_API_KEY", forHTTPHeaderField: "X-Api-Key") 100 101let task = URLSession.shared.dataTask(with: request) { (data, response, error) in 102 guard let data = data else { return } 103 print(String(data: data, encoding: .utf8)!) 104} 105 106task.resume()`}}}},function(e){e.O(0,[14289,27919,71979,10241,47269,84205,49774,92888,40179],function(){return e(e.s=97001)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.